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 535 posted 11 years ago by inreflection7
0 335 posted 11 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 446 posted 11 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 599 posted 11 years ago by FatFolderDesigner
A JavaScript starter with a namespace and closure
0 553 posted 11 years ago by geekyjohn
jLim is a small JavaScript base code. It can be used to built your own JavaScript library or framework.
0 436 posted 11 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 575 posted 11 years ago by Whiteagle
0 457 posted 11 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 639 posted 11 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 485 posted 11 years ago by riddla
you need jQuery already loaded for this to work
0 464 posted 11 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 827 posted 11 years ago by studioevoque
Read more here: http://www.jquery4u.com/dynamic-css-2/change-css-jquery/
0 394 posted 11 years ago by jquery4u
0 433 posted 11 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 852 posted 11 years ago by rumremix
Reset input type text onfocus if value differs from default.
0 396 posted 11 years ago by smonteru
1 359 posted 11 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 377 posted 11 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 457 posted 11 years ago by jafar
1 2 3 4 5 6 ... 15