Welcome To Snipplr


Everyone's Recent Snippets Tagged function



1 2 3 4 5 6 7 Next »
to call this function you would use "asfunction:myFunction,argument1,argument2,argument3" as the href in the tag in an HTML text box.
0 884 posted 16 years ago by Bonky
Flash 8 only I think.
0 719 posted 16 years ago by Bonky
This will highlight all functions not previously defined in PHP for the e text editor. They are assigned to the "entities" in the theme editor. By default, they are highlighted only when originally defined, but not when they are in use in your cod...
0 930 posted 16 years ago by rjm1982
Very basic grab a line of text from a file then display it in an alert box. Uses other functions for loading prepareLinks() and creating the request.
2 785 posted 17 years ago by 1man
Function to look if an element has a class, if it doesn't simply add it to the element. If it does have a class add it to the class that is already there. Function expects 2 values, the element to add the class to, and the new class name (value).
3 907 posted 17 years ago by 1man
This function looks for tables in a web page, then loops through the rows and sets the backgroundColor for ever other row.This creates a striped table which is easier to read.
2 795 posted 17 years ago by 1man
1 508 posted 17 years ago by drwitt
This PHP4 function will increment a given string by a given interval. This might be useful when a string has to be unique. An optional array with "forbidden" return values may be passed. Usage:
2 672 posted 17 years ago by drwitt
Vert useful function since there isn't an insertAfter function in the DOM. Call it inside scripts, it expects insertAfter(*the new element to be inserted*, *the element you want it to be inserted after*);
3 1779 posted 17 years ago by 1man
Since the version of compose() that ships with functional only allows you to compose two functions, I present this version that composes n functions.
0 472 posted 17 years ago by collin
This function first checks to see if PHP is set to automagically quote stuff. If it is, we first strip pre-quoted stuff, then (assuming our text isn't numeric), we properly quote everything. A good bit of room for improvement here, but at the very l...
1 579 posted 17 years ago by sorehead
0 714 posted 17 years ago by gdonald
0 991 posted 17 years ago by janez
New and improved regexp
3 707 posted 17 years ago by ndegruchy
1 2 3 4 5 6 7 Next »