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 842 posted 13 years ago by inreflection7
0 618 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 719 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 948 posted 13 years ago by FatFolderDesigner
A JavaScript starter with a namespace and closure
0 879 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 920 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 884 posted 13 years ago by Whiteagle
0 755 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 1147 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 795 posted 13 years ago by riddla
you need jQuery already loaded for this to work
0 797 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 1394 posted 13 years ago by studioevoque
Read more here: http://www.jquery4u.com/dynamic-css-2/change-css-jquery/
0 684 posted 13 years ago by jquery4u
0 713 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 1318 posted 13 years ago by rumremix
Reset input type text onfocus if value differs from default.
0 695 posted 13 years ago by smonteru
1 608 posted 13 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 643 posted 13 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 757 posted 13 years ago by jafar
1 2 3 4 5 6 ... 15