roncli.com blog
The blog of roncli
roncli.com blog
roncli.com
blog
Profile
roncli
Houston, Texas, United States
Labels
Coding
CTG Music
Editorials
Games
Miscellaneous
Music
Servers
Silliness
Software
Sports
Trax in Space Beta
Weather
Recent Posts
WTF did Revival Productions just do?
A Tale of Two Communities
The Final Stretch
A Two Tiered, Untiered OTL
Secretly, you wish you could've done what I did
What have I done since roncli.com v2?
It's Done. It's Finally Done.
The Big Picture is Starting to Wear on Me
A Low Bang to Buck Ratio
win-acme
Archives
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
June 2008
July 2008
September 2008
December 2008
February 2009
July 2009
August 2009
September 2009
October 2009
November 2009
February 2010
March 2010
April 2010
June 2010
July 2010
August 2010
September 2010
October 2010
November 2010
December 2010
March 2011
June 2011
July 2011
August 2011
September 2011
October 2011
December 2011
January 2012
February 2012
April 2012
July 2012
November 2012
July 2013
April 2014
July 2014
August 2014
November 2014
December 2014
March 2015
April 2015
May 2015
June 2015
July 2015
September 2015
January 2016
February 2016
May 2016
July 2016
November 2016
March 2017
January 2018
May 2018
June 2018
January 2019
January 2021
February 2021
March 2021
August 2021
October 2021
December 2021
August 2022
November 2022
October 2023
February 2024
April 2024
Sunday, December 18, 2011
jQuery-Default-Button 1.2
Posted: 1:29:00 AM 0 comments
I have committed version 1.2 of my jQuery Default Button plugin to Github just now. This update addresses two issues.

First, I wasn't returning the object, meaning you couldn't do jQuery style chaining with it. Now you can.

The second issue was more obscure, and I probably spent about 2 hours trying to figure this out on a project I've been working on. I am also using the jQuery Tiny Watermark plugin which displays a watermark in an input field when it doesn't have focus. The problem I was running into was that fields that used this watermark would stop responding to the enter key after a while.

It took me a while to figure out the problem. The watermark works by replacing the input boxes every time focus is gained or lost, and every time you replace the input box, it loses its events.

The solution was to let the event bubble up to the containing DIV, check to see if the element causing the event was an INPUT element, and then firing the click event on the target element. Not only does this resolve my problem, but it has the added benefit of using less memory because there's one event handler per form, not one event handler per INPUT on the form.

Labels: ,

Tuesday, December 06, 2011
An experiment in GitHub
Posted: 5:08:00 PM 0 comments
Just a small note that I'm beginning porting some of my projects over to GitHub, starting with the smallest ones first. Such as my jQuery Default Button plugin, now on version 1.1.

The goal is to get my open source stuff out in the open, hopefully getting it some more visibility. I know that default button functionality is one that many try to conquer, and having it sit doing nothing on my web server isn't exactly a great way to get my code out there in the open.

Labels: , ,

Sunday, October 03, 2010
jQuery Default Button 1.0
Posted: 5:28:00 PM 0 comments
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: , ,