Welcome To Snipplr
Everyone's Recent JavaScript Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Returns an object with the `event.button` values of both the W3C and Microsoft models.
0
825
posted 13 years ago by wizard04
These functions allow you to set a handler for a mouseleave/enter event.
0
756
posted 13 years ago by wizard04
when need to created a dom element repeatedly , use string concatenation to avoid for loop you can use repeat function from below.
0
831
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
673
posted 13 years ago by jasonseney
This is implementation of pseudocode given in quicksort wikipedia page. Did it just for fun :)
0
641
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
1037
posted 13 years ago by LeeProbert
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
JavaScript
greaseMonkey - Ajout script personnelle sur vos pages - Add your owner javascript in your html\'s code
0
808
posted 13 years ago by nasso
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
1028
posted 13 years ago by fabulant