Welcome To Snipplr


Everyone's Recent Snippets Tagged function



Used to sanitize user input for email.
0 1076 posted 16 years ago by jspicher
Used to cleanly truncate text.
0 1097 posted 16 years ago by jspicher
Convert a string to number.
0 1001 posted 16 years ago by jspicher
This makes template code that applies to children of a particular page much more readable, especially if you can use a page path instead of an ID: `if ( is_child_of( 'topic/subtopic' ) ) :`.
1 1548 posted 16 years ago by cyberhobo
0 1065 posted 16 years ago by zemin
very useful function that allows you to redirect to the user to a given location
1 1529 posted 16 years ago by daveismyname
A nice example of a function that returns another function.
0 3429 posted 16 years ago by narkisr
0 1454 posted 16 years ago by iTony
Runtime Object Evaluator; search for string object properties that start with !! and eval the content. Very useful if you want to load JSON from file and evaluate its fields on effective usage or access global variables at runtime. [Follow me on T...
1 1072 posted 16 years ago by straps
function as jquery plugin to test if selector is found on the current page. Sample use: if ( $("#myID").onpage() ) { $("#myID img").click(function(){ //do this..here.. });
0 1354 posted 16 years ago by pixelhandler
A way to time how long it takes to get through a certain block of code. Good way to measure performance on the page. You could also use the built in logging functions in firebug. Not sure how they would tally up in a test.
1 1626 posted 16 years ago by 1man
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 1384 posted 16 years ago by chrisjlee
2 1782 posted 16 years ago by iloveitaly
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 1601 posted 16 years ago by segdeha
just testing snipplr.com
0 1171 posted 16 years ago by cfleschhut
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 1224 posted 16 years ago by amischol
closes opened tags in text piece. original code slightly modified to supress PHP warnings NOTE: need to fix the order of closing tags to get standards compliance
0 1329 posted 16 years ago by kossmoss
Returns last word of a string (words separated by blanks). if string does not have any blanks, it will return the whole string.
1 1395 posted 16 years ago by fischkopp
A quick and easy function that will output table column names and loop through your SQL recordset results outputting it into a HTML table.
2 2104 posted 16 years ago by neal_grosskopf
If you're going to be using a common function throughout the Web site, you can include the function in your MasterPage and gain access to it from each aspx that inherits from this MasterPage; like so:
0 1854 posted 16 years ago by blackf0rk
Get Function Name ============ This will only return (a string) if the object passed to getFunctionName is a function or an "object" function from IE. The function does not rely on function.name if present as it can't always be trusted. Examp...
0 1181 posted 16 years ago by Sephr
1 1097 posted 16 years ago by joeydi
Well, not the best one...
1 1425 posted 16 years ago by Sn0opy
asp function similar to php one, to truncate long words inside a string
1 1976 posted 17 years ago by ginoplusio
it already exists in php
1 1322 posted 17 years ago by ginoplusio
0 1256 posted 17 years ago by iTony
function that return TrueVal if Condition is true else return FalseVal.
0 1837 posted 17 years ago by ginoplusio
Secure, Advanced, Better, Faster... function for remove/strip tags(Anti-XSS).
2 2227 posted 17 years ago by YPY