Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



1 ... 12 13 14 15 16 ... 33
1 510 posted 14 years ago by rebel2000
Was using this to disable certain js functionality as it wasnt working on apple\'s webkit
2 904 posted 14 years ago by thiswayup
In regards to progressive enhancement, see also the [jQuery version](http://snipplr.com/view/48275/default-value-for-input-fields-jquery-version/).
6 940 posted 14 years ago by riddla
Just a fun and silly way to asynchronously update tweets about Justin Bieber.
3 957 posted 14 years ago by Nettuts
0 616 posted 14 years ago by Eystein
So recently I was asked to change a navigation style of an existing site to drop-down menus. Simple, I thought, just use one of the many existing drop-down plugins. I tried many, but most seemed to use hardcoded styles and I had a few problems (so...
0 906 posted 14 years ago by dom111
I\'m constantly testing forms over and over for one reason or another, and am fed up with making a typo and autocomplete not populating all the data, so I made this little snippet. It searches for form elements on the page (input, textarea and select...
1 923 posted 14 years ago by dom111
Uses html5 geolocation to determine device position and sets this as the starting point for directions on a Google Map. Use modernizer to detect support.\r\n\r\nhttp://diveintohtml5.org/geolocation.html\r\n\r\nhttp://code.google.com/apis/maps/docume...
1 1166 posted 14 years ago by Meander365
Just be sure to slap the div for the chars left message within the same div/p as the textarea so the dom walk works.
1 872 posted 14 years ago by housecor
Great for those situations where you need an element fixed on a page - so when a user scrolls it stays in the same position - *relative to its parent element*.
0 852 posted 14 years ago by Meander365
Use this to create a conditional statement for chrome.
0 672 posted 14 years ago by allnatural
A more flexible version of the 'official' Facebook feed dialog example. "The Feed Dialog prompts the user to publish an individual story to a profile's feed. This does not require any extended permissions." "The following simple JavaScript exam...
0 882 posted 14 years ago by coprolit
To identify whether javascript is disabled in IE or not
0 770 posted 14 years ago by hairajeshk
have it as bookmark - clicking on it will validate the current page
1 553 posted 14 years ago by silviud
Set a cookie that expires at midnight.
1 2328 posted 14 years ago by jonkemp
The cookie expires the number of days from the time it is set.
0 661 posted 14 years ago by jonkemp
0 694 posted 14 years ago by jonkemp
Thankfully, Sjoerd Visscher mentioned an interesting technique that could be used to force IE to use the specified CSS styling. Specifically, once you create a new DOM element (of the same name as the one in the document) all styling is applied. [.....
0 834 posted 14 years ago by stephcode
used on: ezpl theme, header.php just be sure to enqueue for any such scripts BEFORE wp_head(). Otherwise they don't get loaded. That is to say, it's probably best to have wp_head() rigth before </head>.
0 674 posted 14 years ago by mjsiemer
A recent update to either Google's search results page or Firefox's Tab Mix Plus add-on has prevented a locked tab from opening links in a new tab. This Greasemonkey script removes the tracking code on the Google links that causes the problem. I don'...
0 875 posted 14 years ago by wizard04
Simple Javascript test of the HTML 5 geolocation API spec
0 831 posted 14 years ago by iamjpg
Basic JavaScript browser redirect.
1 626 posted 14 years ago by jonkemp
1 ... 12 13 14 15 16 ... 33