Music. Coding. Gaming. Life.

jQuery Default Button 1.0

Posted Sunday, October 3rd, 2010 10:28:00 pm
I was searching the Internet today for something that would replace asp:Panel's DefaultButton property. I found a lot of solutions, but the fact that you had to add several lines of code to every page didn't appeal to me.

What I wanted to do was something like this:


This jQuery snippet would simply take the login form with an id of "#LoginForm" and make it so that any time you pressed the enter button within that form, it would click the "#LoginButton".

Well, now I can. I created a jQuery plugin that does exactly this. Download jQuery Default Button 1.0.


Loading... Media Player