Welcome To Snipplr
Everyone's Recent Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Brilliant solution using Object.prototype.toString()
Test cases included (commented out)
0
698
posted 13 years ago by wizard04
Returns an object with the `event.button` values of both the W3C and Microsoft models.
0
832
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
when need to created a dom element repeatedly , use string concatenation to avoid for loop you can use repeat function from below.
0
838
posted 13 years ago by root_hacker
this is the way for toggling something on mouse hover in and out
0
1023
posted 13 years ago by root_hacker
3rd argument of 'add_action' function is priority, by default set to 10. This is a much simpler way of reorder posts exactly as you want them to appear.
1
604
posted 13 years ago by mrgurner
No need to create a seperate function for this one. Just one line to clear the default value on click and leave the value when it has been altered.
1
796
posted 13 years ago by dyteq
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
Use as follow :
.example{
.insetShadow(0, 1px, 5px, rgba(0,0,0, .5));
}
0
666
posted 13 years ago by kanouf