|
|
Sunday, October 03, 2010 |
jQuery Default Button 1.0
Posted: 5: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:
$("#LoginForm").DefaultButton("#LoginButton");
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.Labels: Coding, JavaScript, jQuery Default Button
0 Comments
|
|