jQuery Minute™

…a jQuery Minute™ later and you're done!

Archive for December, 2007

On Holiday!

without comments

Merry Christmas to you all! I am on holiday until after New Years, so I won’t be posting any new tips!

If you have a tip or news item that you want to share on jQuery minute, please drop me a line at tip-time at the jqueryminute domain dot com.

Cheers!
-Jonathan

Written by jdsharp

December 24th, 2007 at 10:55 am

Posted in jQuery Minute

Wildcard ID’s – Select by ID and Filter

without comments

Here’s a solution for selecting elements by ID and running a regex to filter the results:

$(‘*[@id]‘).filter(function() {
var regex = /^regularExpressionToMatchIdsAgainst/;
return ( $(this).attr(‘id’).match(regex) !== null );
})

Written by jdsharp

December 21st, 2007 at 10:56 am

Posted in Code-bits

jQueryForDesigners.com Launched

without comments

Remy Sharp (no relation) has launched jQuery For Designers. Be sure to check it out and start participating!

http://jqueryfordesigners.com/

Written by jdsharp

December 18th, 2007 at 10:28 am

jQuery 1.2.2 beta released

without comments

As from the jquery-dev google groups, jQuery 1.2.2 is in beta stage:

John Resig’s Beta Release Post -
Get jQuery 1.2.2b.js

Be sure to read John’s Post about how to test and submitting bugs!

Written by jdsharp

December 17th, 2007 at 12:36 pm

Posted in jQuery Core

Plugin Namespace

with one comment

This recently came up again on the jquery-en Google Groups list, here’s a way that you can namespace your plugin.

http://www.nabble.com/Re%3A-passing-this-p13540912s27240.html

Written by jdsharp

December 12th, 2007 at 12:49 pm

addClass() removeClass()

without comments

If you have to add or remove multiple classes with jQuery, the most efficient way is to separate the classes with a space and make one call.

Such as:

1
$('body').addClass('abc def');

As opposed to:

1
$('body').addClass('abc').addClass('def');

Written by jdsharp

December 11th, 2007 at 12:22 pm

jQuery Documentation – Windows CHM Reference Manual

without comments

Picked up from the jquery-en Google Groups, here is a Windows CHM Help file version of the jQuery documentation.

http://charupload.wordpress.com/2007/12/07/jquery-documentation-chm/

Written by jdsharp

December 11th, 2007 at 12:07 pm

Calculate Browser’s Scrollbar Width

with 2 comments

Here’s a solution for calculating the brower’s scrollbar width. Tested in Internet Explorer 6 & 7, Firefox 1.5+ and Safari.

Calculate Brower’s Scrollbar Width

Written by jdsharp

December 10th, 2007 at 2:17 pm

Posted in Code-bits

Welcome!

without comments

Greetings, I’m Jonathan Sharp and first coined the term “jQuery Minute” in this discussion thread on the Google Groups mailing list. jQuery Minute refers to how easy jQuery makes JavaScript for your web development tasks.

This site is aimed at providing quick tid-bits of code and “hidden” features of the jQuery library as well as highlight some neat plugin’s and uses of jQuery.

Written by jdsharp

December 10th, 2007 at 2:00 pm

Posted in jQuery Minute