|
|
|
Below are the top ranked snippets.
14
toddersbud
This shows how the computed style of each node differs from the computed style of its parent. The root element, which has no parent, is instead compared against the root of a blank HTML document.
* create a new bookmark called "compute styles" in your firefox toolbar. Place the snippet code in the location field of your "compute styles". click the compute styles bookmark, then click an element on the page with the crosshairs.
* create a new bookmark called "compute styles" in your firefox toolbar. Place the snippet code in the location field of your "compute styles". click the compute styles bookmark, then click an element on the page with the crosshairs.
14
This function is useful in helping to deter spam bots by obfuscating things such as e-mail addresses and URLs that are displayed on a web page. While it's not 100% fool proof, it does offer some protection.
Example:
$email = html_entitize('foo@baz.org');
/*
Outputs foo@baz.com
*/
Example:
$email = html_entitize('foo@baz.org');
/*
Outputs foo@baz.com
*/
14
Given a PHP array (even a deep nested array), returns a string representation of that array as JavaScript array. Useful when using PHP to output JavaScript.
14
This snippet effectively reads an XML document using XPathDocument (read-only) instead of using the DOM. This snippet returns the full element values in between elements. For example:
root element
code element
This is a test.
/code element
/root element
GetXmlString("/root/code"); //returns 'This is a test.'
root element
code element
This is a test.
/code element
/root element
GetXmlString("/root/code"); //returns 'This is a test.'
14
For those times you need to do a loop in PHP, but have the outcome be in descending order (ie, start at 10 and end at 1).
14
This little function will split an e-mail address passed to it at the @ sign, and make sure that there is a valid e-mail server at the other end =)
14
Generates select boxes, text boxes, check boxes and radio buttons. Via a handful of functions.
14
Trim , Left trim (ltrim) and Right Trim (rtrim) in javascript
14
It works with Array types. The example is a simple list of numbers, but the array could contain anything; lists of strings, functions, DOM nodes, whatever. Unfortunately, a lot of things that seem like arrays in the DOM aren't really, so you can't shuffle the images on a page with just document.images.shuffle() all by itself.
14
A simple Tooltip for you web pages with minimal code.
Images , Text and HTML code can be shown inside the tootip
Images , Text and HTML code can be shown inside the tootip







