Welcome To Snipplr


Everyone's Recent jQuery Snippets



1 2 3 4 5 6 ... 30
How to dynamically generate combo box contents depending on the selection made by a user on earlier combo box.
0 821 posted 12 years ago by BlackSheep
Chequea todos los checkbox con un mismo nombre desde uno aparte que tiene como ID "checkeverythink_btn"
0 880 posted 12 years ago by serialk89
The following code snippet will highlight the row in a table when the checkbox is checked. It will remove the highlight when the checkbox is unchecked. This will work for basic <table> as well as a GridView. The "input:not(#selectAll)" will ignore...
0 1043 posted 12 years ago by mattvbiggs
Annoyed by Please enter a valid phone number. For example (123) 456-7890 or 123-456-7890. in admin? Here's the trick. Copy over your default/default/template/customer/tab/addresses.phtml to your default/your-template/template/customer/tab/address.ph...
1 943 posted 12 years ago by cpres
Simply set the id in the content, and use a hash in the anchor to scroll to it.
0 855 posted 12 years ago by thewickedchemist
jQuery shorten content inside container.
0 739 posted 12 years ago by praveensewak
This is just a quick and simple lazy way to do this, didn't feel like using a plug-in for something that is only used on one page...
0 883 posted 12 years ago by thewickedchemist
Colorize Portions Of String
0 711 posted 12 years ago by StrawMan
Source: http://css-tricks.com/favicons-next-to-external-links/
0 926 posted 12 years ago by thewickedchemist
IE notification to upgrade your browser
0 1003 posted 12 years ago by raz
this can run before $(document).ready event, since it doesn't rely on any DOM.
1 955 posted 12 years ago by Narayon
Here’s a very simple script which adds numbers sequentially to an unordered list using jQuery
0 926 posted 12 years ago by satie83
Here's a snippet for copying (all) the eventhandlers of one element to another with jQuery and effectively cloning the behavior of one element. Keep in mind that if it's possible, you should just register the same handlers you actually need, inste...
0 1503 posted 12 years ago by chlab
autoclear input text and text area
0 952 posted 12 years ago by silent_killer
Removes anything that isn't a digit from input on complete.
0 1069 posted 12 years ago by vagrantradio
With the current combobox implementation, the full list is emptied and re-rendered every time you expand the dropdown. Also you are stuck with setting the minLength to 0, because it has to do an empty search to get the full list. Here is my own im...
0 1727 posted 12 years ago by Huskie
Another approach that helps saving the overhead calls of the scroll event and the subsequent code.
0 968 posted 12 years ago by Narayon
Simple solution found via link. Just edit code from demo page(s). Also http://uniformjs.com/
0 1063 posted 12 years ago by rumremix
Clear all text fields on focus based on original value with single function. The code checks for a 'title' attribute on each input with class 'text' and compares this to the current value of the field.
0 1182 posted 12 years ago by Huskie
If scrollTop isnt equal to 0 then show #toTop
0 1413 posted 12 years ago by kyllle
IE6 and IE7 don't respect the 'outline' attribute for hyperlinks. This jQuery snippet removes the annoying outline in these browsers.
0 1154 posted 12 years ago by Huskie
Choose the 4th list item and change the background color to gray
0 805 posted 12 years ago by epyyjop
simply disable an input (type=text) using Jquery.
0 870 posted 13 years ago by artaserse
jQuery plugin to save individual form fields each time something changes. Usage: `$('#MyForm').autosave(url, options);` where `url` defaults to form.method and `options` defaults to $.fn.autosave.defaultOptions (UNTESTED)
0 912 posted 13 years ago by kendsnyder
simple jquery jeditable example
0 987 posted 13 years ago by eowynx
This goes through the specified div, and finds a div with the class of current. It then removes the class from that div, and adds it onto the next one. Note: Through CSS make the current class with a display block, and the slide class with a displ...
0 745 posted 13 years ago by accelm
There are a couple of steps involved to connect to an SAP web service. Really, its about the same as connecting to a regular ASMX web service, using the .ajax() function. Make sure you have a WSDL with the function and connection information. I recom...
0 1535 posted 13 years ago by mattvbiggs
Thank you marcg for posting this on Snipplr http://stackoverflow.com/questions/1379994/detect-when-a-specific-image-has-finished-loading
0 925 posted 13 years ago by focal55
Use: <script> $(document).ready(function(){ $("#input").forceNumeric(); }); </script>
1 882 posted 13 years ago by itsmeameer
This is a very simple way of highlighting the current page of a menu. It uses javascipt to take the current url and cross checks it against any URLs that match in the menu. If one matches then add an ‘active’ class to it. Be careful with #’s t...
1 1003 posted 13 years ago by soup
1 2 3 4 5 6 ... 30