Welcome To Snipplr
Everyone's Recent Snippets Tagged javascript
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Namespace to avoid collision with other javascript variable/method names
1
776
posted 15 years ago by inkdeep
This comes in handy when working in big objects and you need to see what's happening on the inside of an instance.
I aliased 'console.log' to 'put' and wrapped it in a try/catch block that throws alerts if no console is available. Less typing - an...
1
735
posted 15 years ago by inkdeep
Quickly get the index of the current element. I find myself re-using this several times in a document, so I made a lil' function for it.
3
1279
posted 15 years ago by dougunderscorenelson
If you ever need to list all the internal functions of JQuery without the use of googling. You can always use the following command with firebug.
1
853
posted 15 years ago by chrisjlee
Version differs slightly from the demo, as the src for the thumbnail image is a child of the demo example, so has been slightly modified.
0
879
posted 15 years ago by davebowker
an external javascript sort function, which you can import into flash to help sort arrays of objects. include the script thus:
#include "objSort.js"
2
987
posted 15 years ago by stiobhart
Enable jQuery on any website, just clicking on a bookmarklet with this code. Or drag & drop this on your bookmark bar: <a href="javascript:(function(){var%20s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs...
4
850
posted 15 years ago by danielfilho
Assign methods to a Function prototype when you intend to create instances of the type of object. Use object literals when you just need a container for functions.
0
938
posted 15 years ago by segdeha
I made an absolute tinny code to find the highest z-index of absolute DIV
to show my shouting box and to make it appear absolutely at the top of all html elements.
I used selector of â€body > *‘ instead of ‘body *‘.
â€body > *‘ means...
2
1078
posted 15 years ago by adnan
Call with the path of any javascript you want to load into the HEAD of the ASPX page.
1
1277
posted 15 years ago by jink
Adds a class of hasJS to the html element, can be used for CSS styling.
1
1059
posted 15 years ago by 1man
you can use this function for ie javascript bug. Ä°t is switchin display with javascript
0
758
posted 15 years ago by Thresh
A lovely little one liner that strips out all non alphanumeric chars first, then replaces the spaces with hyphens, then converts all to lowercase :D
0
660
posted 15 years ago by xtheonex
Hi, all, this is the "checkFunction" extension for jQuery.
This extension takes two parameters:
1. fPointer
This parameter is the "possible" function to check
1.1 This parameter can be a String that is a function poi...
1
724
posted 15 years ago by amischol