Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



1 ... 10 11 12 13 14 ... 33
ExtJS is great for OO style interface design but has a couple of strange behaviors. For instance when adding the ExtJS RowExpander plugin to a grid, the plugin overrides the gridView's getRowClass function. That's not really what you want. For instan...
0 696 posted 13 years ago by misterb101
I saw this useful little variation of a for loop in a tutorial by Kevin Yank at Sitepoint. By adding an additional variable "ii" in the loop's arguments, you can avoid having your program calculate the length of your array every time it loops through...
1 639 posted 13 years ago by danielwrobert
This tiny jQuery plug in forces a user to enter only numeric values on an input field by silently removing non-numeric values as they're entered. (Caution: Never rely on client-side validation; use server-side validation as well)
2 977 posted 13 years ago by BrunoDeBarros
No permite ingresar la ñ o Ñ
0 696 posted 13 years ago by elquemero
Use case: * Paste the javascrit BEFORE the closing body tag `</body>`
0 607 posted 13 years ago by mnstefan
Quick and easy javascript in_array function. It's not perfect, but if you need something quick, this is it.
1 509 posted 13 years ago by cornellsteven
copy from google code search result page
0 511 posted 13 years ago by sospartan
random image loaded on page refresh
0 523 posted 13 years ago by raondo
This is a simple and effective way yo make sure people are actually filing out a form before submitting it. If you need to verify content it should be done server side (so that if you come across the odd person with javascript turned off it wont brea...
0 715 posted 13 years ago by FatFolderDesigner
0 331 posted 13 years ago by doorhammer
Cleaned up (with the help of jslint.com) versions of cookie handling functions
0 1209 posted 13 years ago by pmw57
0 627 posted 13 years ago by terrencewood
This function automates the creation of the <OPTION>s of a <SELECT> element. It's ideal for your AJAX apps when you create display elements using Javascript It accepts to different kind of arrays: An array of key:values… var arrDirs = {...
0 517 posted 13 years ago by nomada
This fixes the downside of the original javascript keyboard navigation snippet I posted here so that if you manually scroll past to a new chapter mark it will register that and keep track of your location better. The old code would ignore any scroll...
2 630 posted 13 years ago by FatFolderDesigner
Starting with GoogleTV in mind I made a script to help navigate a page key basic key inputs, in this case I'm using the left and right arrows to jump between the H1 tags on a page, although the modifications to make it do other things would be very s...
0 640 posted 13 years ago by FatFolderDesigner
A nice little code snippet for displaying images randomly when a page is reloaded.
0 540 posted 13 years ago by danielwrobert
If you are trying to solving one or both of these problems: + If the window is resized to a smaller size that was designed for - a scrollbar would be nice. + If the content is larger than the original design - a scrollbar would be nice Then use...
1 641 posted 13 years ago by chrisaiv
JavaScript file that creates the HTML5 elements for IE8 and below (by Remy Sharp). Just call the file from the head of the html in a conditional comment [if lte IE 8].
0 501 posted 13 years ago by polly42
tested with CKEDITOR 3.0 and Firefox 3.6.12 and IE 8
0 397 posted 13 years ago by fahrenx
Simple function that filters out any duplicate items in an array.
7 1382 posted 13 years ago by Nettuts
1 ... 10 11 12 13 14 ... 33