Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged jquery



1 2 3 4 5 6 ... 15
image rollovers in jquery are usually super easy. However it sucks when working with absolute image paths - like a separate media server or CDN. Heres a quick snippet using substring and lastIndexOf to swap out the image src.
0 1020 posted 13 years ago by inreflection7
0 786 posted 13 years ago by focal55
We use our own dialog code, but the jQuery method of creating an overlay works well, so this is taken from the jQuery UI code and simplified.
0 892 posted 13 years ago by mejamiewilson
This is a simple example of the google maps javascript API v3. If you want a map with a marker this is the minimum you need to do to get it done. Theres more talk about how it's all set up, and how to use the other static image map as well at the lin...
1 1123 posted 13 years ago by FatFolderDesigner
A JavaScript starter with a namespace and closure
0 1038 posted 13 years ago by geekyjohn
jLim is a small JavaScript base code. It can be used to built your own JavaScript library or framework.
0 1079 posted 13 years ago by freelancephp
If you are struggling against some problems with google maps and tabs be aware that, in order to avoid problems, jQuery sets the width & height of every hidden element to Zero. To fix this problem all you have to do is trigger the resize event and...
0 1042 posted 13 years ago by Whiteagle
0 895 posted 13 years ago by ronal
look through the list items in your main nav and based on href of anchor tags this will set the top level link to have an 'active' class.
0 1361 posted 13 years ago by iammikecohen
See https://github.com/clemens/i18n_demo_app/blob/master/config/locales/de.yml for the source of the month names etc.
1 948 posted 13 years ago by riddla
you need jQuery already loaded for this to work
0 930 posted 13 years ago by studioevoque
Sometimes, you need to setup functionality before jQuery is loaded (e.g. because of a template). You can use this snippet to schedule the function after jQuery is loaded.
1 1655 posted 13 years ago by studioevoque
Read more here: http://www.jquery4u.com/dynamic-css-2/change-css-jquery/
0 840 posted 13 years ago by jquery4u
0 845 posted 13 years ago by ronal
Use whatever is needed to select the input box. $('#searchBoxOuter td.ms-sbcell input') reflects some custom master page html I have so I used that.
0 1518 posted 14 years ago by rumremix
Reset input type text onfocus if value differs from default.
0 831 posted 14 years ago by smonteru
1 736 posted 14 years ago by pussard
source: http://stellapower.net/content/javascript-support-and-arrayindexof-ie/<br> source: http://www.robsearles.com/2010/03/11/ie-7-indexof-replacement/
0 788 posted 14 years ago by shabith
Use the rel attribute to specify which "html" file to load. In this case the link is set to the "About" page and will load the about.html file with AJAX and update the site's title and address.
0 896 posted 14 years ago by jafar
1 2 3 4 5 6 ... 15