Welcome To Snipplr
Everyone's Recent Snippets Tagged function
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
to call this function you would use "asfunction:myFunction,argument1,argument2,argument3" as the href in the tag in an HTML text box.
0
1108
posted 17 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
1144
posted 17 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
998
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
1136
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
1012
posted 17 years ago by 1man
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
854
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
2058
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
637
posted 18 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
730
posted 18 years ago by sorehead