Welcome To Snipplr


Everyone's Recent JavaScript Snippets Tagged javascript



1 ... 8 9 10 11 12 ... 33
Returns an object with the `event.button` values of both the W3C and Microsoft models.
0 831 posted 13 years ago by wizard04
These functions allow you to set a handler for a mouseleave/enter event.
0 760 posted 13 years ago by wizard04
if you need ecmascript 5 functions then use underscore.js
0 764 posted 13 years ago by root_hacker
when need to created a dom element repeatedly , use string concatenation to avoid for loop you can use repeat function from below.
0 835 posted 13 years ago by root_hacker
Safely loads a javascript file asynchronously Example: (function() { __safeLoadScript("http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", function() { alert(jQuery); }); })();
0 679 posted 13 years ago by jasonseney
Activation: con Scope: source.js, source.js.jquery
0 735 posted 13 years ago by divtagged
This is implementation of pseudocode given in quicksort wikipedia page. Did it just for fun :)
0 642 posted 13 years ago by naren1012
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 1038 posted 13 years ago by LeeProbert
1 672 posted 13 years ago by dbugger
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 899 posted 13 years ago by samwa
using prototype to add instance methods to a Class
0 837 posted 13 years ago by reelfernandes
Use this to validate if input has html elements
0 855 posted 13 years ago by anagaiyahoocom
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 686 posted 13 years ago by coprolit
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 517 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 932 posted 13 years ago by coprolit
Free JavaScript slideshow with thumbnail gallery, zoom-in-effect, zoom-out-effect and transparency-effect (opacity). Add as many pictures as you like. Each picture can be linked and commented. The thumbnail gallery can be displayed or hidden. True co...
0 1031 posted 13 years ago by fabulant
1 ... 8 9 10 11 12 ... 33