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 869 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 816 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 1164 posted 13 years ago by BrunoDeBarros
No permite ingresar la ñ o Ñ
0 860 posted 13 years ago by elquemero
Use case: * Paste the javascrit BEFORE the closing body tag `</body>`
0 747 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 644 posted 13 years ago by cornellsteven
copy from google code search result page
0 636 posted 13 years ago by sospartan
random image loaded on page refresh
0 663 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 896 posted 13 years ago by FatFolderDesigner
0 410 posted 13 years ago by doorhammer
Cleaned up (with the help of jslint.com) versions of cookie handling functions
0 1419 posted 13 years ago by pmw57
0 769 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 664 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 778 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 790 posted 13 years ago by FatFolderDesigner
A nice little code snippet for displaying images randomly when a page is reloaded.
0 680 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 773 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 635 posted 13 years ago by polly42
tested with CKEDITOR 3.0 and Firefox 3.6.12 and IE 8
0 530 posted 13 years ago by fahrenx
Simple function that filters out any duplicate items in an array.
7 1608 posted 13 years ago by Nettuts
1 ... 10 11 12 13 14 ... 33