Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged jquery



2 1101 posted 16 years ago by hotice
0 1091 posted 16 years ago by tclancy
A javscript snipped which will mark each table cell with a CSS class containing the cell's column number. This allows you to set the table column widths using just one CSS rule and without hand editing the table HTML code. This is to workaround the l...
0 2367 posted 16 years ago by miohtama
1) if jQuery is already loaded into a browsers' cache -> do nothing 2) if the object is undefined, write a script-element into the source which references google's minified jquery file. 3) if jQuery is still undefined (let's assume Google is down)....
2 1636 posted 16 years ago by iroybot
1 1525 posted 16 years ago by arpit
Enable jQuery on any website, just clicking on a bookmarklet with this code. Or drag & drop this on your bookmark bar: <a href="javascript:(function(){var%20s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs...
4 1448 posted 16 years ago by danielfilho
Stub for creating classes in JQuery
0 1419 posted 16 years ago by arpit
A lovely little one liner that strips out all non alphanumeric chars first, then replaces the spaces with hyphens, then converts all to lowercase :D
0 1236 posted 16 years ago by xtheonex
<a href="javascript:(function(){var%20ids=[];jQuery('*').each(function(){if(this.id&&this.id!==''){if(ids[this.id]){console.log('duplicate%20id%20found:%20'+this.id,this,ids[this.id])}else{ids[this.id]=this}}});})();">Find duplicate IDs</a> (drag me...
1 1711 posted 16 years ago by krunkosaurus
1 1000 posted 16 years ago by danielfilho
Remove item (number or string) from array, using jQuery (method grep).
3 17367 posted 16 years ago by gustavopaes
Standard list markup, adds button to expand a super dropdown next to the link.
1 1807 posted 16 years ago by davebowker
0 1377 posted 16 years ago by davebowker
Testing if toggle has happened.
0 1140 posted 16 years ago by davebowker
Extracts a string paremeter from the url query string. Basic operation wont handle multiples such as radio buttons etc. Just gets the first instance of the name and returns it's value.
1 1325 posted 16 years ago by kouphax
Allows the user to bind an event into a certain position in the call stack for events.
3 1748 posted 16 years ago by garside
bring back the old browser detection
1 1867 posted 16 years ago by localhorst
include document ready and standard code to run swfobject smoothly in IE6
1 1606 posted 17 years ago by apro2000
Starting from jQuery 1.3
1 1663 posted 17 years ago by omixen
Simple function for turning RETURN key presses into TAB key presses. Focuses input element next in the DOM (usually makes sense), unless we are at the end of the form, at which point it focuses the first element in the form for cyclical purposes.
2 3744 posted 17 years ago by kouphax
Simple jQuery snippet for cleanly and automatically setting up your google analytics
4 1634 posted 17 years ago by garside
Thanks to [James]( http://www.girsbrain.org/blog ) for this code.
0 1281 posted 17 years ago by zachharkey
jQuery client-side form validation for the Radiant CMS mailer extension. Requires jQuery 1.2.6+ Each required field needs a class of "required" assigned to the input tag.
0 1573 posted 17 years ago by bcalloway
0 1315 posted 17 years ago by davebowker