Welcome To Snipplr
Everyone's Recent JavaScript Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Removes the margin-right spacing from the item in a line of items. This works cross browser unlike the CSS last-child selector (which doesn't work in IE6 or IE7).
0
767
posted 13 years ago by redconservatory
Sometimes you have a load of HTML that is difficult to write up as a String from within a javascript function so this is an example of a simple Panel with an event for after rendering that injects it with content from a file.
0
1037
posted 13 years ago by LeeProbert
This is the latest Facebook invite all code to select all your friends in an event page
1
671
posted 13 years ago by socialwebexpert
This function emulates support for placeholder text on form elements, run it inside a loop or call it by passing in a specific id reference
1
770
posted 13 years ago by errkk
returns the number of seconds since 1 jan 1970
This is useful for generating a number in a url to stop a page from caching
1
894
posted 13 years ago by samwa
With setTimeOut a reference to a function object cannot provide parameters for the scheduled execution of that function.
We can instead use a closure to provide parameters for the execution of a function prior to the execution of that function.
0
683
posted 13 years ago by coprolit
JavaScript
accessing the DOM of a page loaded in an iframe [javascript] [dom] [iframe] [for-twitter]
0
1170
posted 13 years ago by Thammas
This is my own (compact) JS library which contains a variety of methods - cookies, (fast) sorting of tables,paragraphs, etc., highlighting rows, moving elements up or down, converting strings to dates, updating a clock etc.. Include the library and a...
0
514
posted 13 years ago by AndyG
"Javascript module pattern emulates the concept of classes in such a way that we're able to include both public/private methods and variables inside a single object, thus shielding/namespacing particular parts from the global scope."
When inheritanc...
0
931
posted 13 years ago by coprolit