Welcome To Snipplr


Everyone's Recent Snippets Tagged DOM



« Prev 1 2 3
Use PHP's DOM parser to convert a table into plain text (including links with images)
0 1334 posted 9 years ago by nigelnquande
For side by side ULs that become too wide on small screens/devices. The following script let you merge or unmerge ULs depending on the size of the screen/device. Works with jQuery
0 666 posted 10 years ago by jbernus
The use of dynamic data acquisition on modern web sites and in a lot of intranet applications, sometimes means we have to build structures dynamically as data comes in from a feed or AJAX operations. The problem is not with the data, but rather that...
0 632 posted 10 years ago by COBOLdinosaur
Javascript DOM Create Element
0 622 posted 11 years ago by flamboyanz
in jquery mobile, .html() not refresh DOM. Execute this function after any DOM change.
0 880 posted 11 years ago by goo
Here’s a very simple script which adds numbers sequentially to an unordered list using jQuery
0 656 posted 11 years ago by satie83
Navigating the DOM in jQuery is incredibly simple and thats to phpQuery you can do the same in php. Below are some examples of how it's used, the key change bing that instead of $() you use pq(), and instead of a . you used ->. Theres alot more detai...
0 789 posted 12 years ago by FatFolderDesigner
The Google Closure lets you get DOM elements with getElement( id ) and getElementByClass( class ). This function combines the two to let you get elements similarly to the way jQuery does. E.g. getElement( '#home .sidebar #links') returns the elemen...
0 864 posted 12 years ago by cjcenizal
Open PHP file and enter User Credentials for localhost. The default dates are set to negotiate the 2011 season, but change the date variables to match your desired season data. The start date should be the day before opening day, and the end date t...
0 704 posted 12 years ago by wa-rufio
Simple recursive function to find objects that match the value of str hanging anywhere off the global JS object (window).
0 688 posted 12 years ago by richt
Check if user has intruded a real email address. Return true (real email) or false (fake email). Arguments: Element from a form. From book Dom Scripting by Jeremy Keith
0 901 posted 12 years ago by alberomo
Arguments: Element from a form. Take that element and checks if is filled. If not, returns false. If is filled, returns true. From book Dom Scripting by Jeremy Keith
0 830 posted 12 years ago by alberomo
A JS function that put the focus in the form field associated to a label element whenever is clicked. The for atributte of the label element must match the id attribute of the associated form field. It takes no arguments. From book Dom Scripting by...
0 525 posted 12 years ago by alberomo
0 887 posted 12 years ago by studioevoque
3 686 posted 13 years ago by batamire
0 551 posted 13 years ago by madr
When injecting via jQuery HTML content which contains script tags referencing external scripts, which are then referenced via scripting elsewhere in the injected HTML, some browsers (Chrome) will not wait for the external scripts to load causing the...
2 897 posted 13 years ago by harikaram
This snippet of code is probably the most common and _valuable_ in the world of jQuery.
1 698 posted 13 years ago by creativeboulder
1 669 posted 13 years ago by arif
Thankfully, Sjoerd Visscher mentioned an interesting technique that could be used to force IE to use the specified CSS styling. Specifically, once you create a new DOM element (of the same name as the one in the document) all styling is applied. [.....
0 654 posted 13 years ago by stephcode
0 731 posted 13 years ago by cadrlife
the LIBXML parameter is what this snippet is about. Also this is one way to retrieve XML without having a XML-declaration prepended <?xml>
1 646 posted 13 years ago by iroybot
Similar to [Get Elements by Class Name]( http://snipplr.com/view/1696/get-elements-by-class-name/), but with optional "tag" parameter. Performance is increased by first retrieving the desired tag if available.
0 583 posted 13 years ago by jasonseney
Code is to demonstrate the use of DocumentBuilder to parse the XML file. And retrieve the data from it.
1 766 posted 13 years ago by PravinChk
SimpleSelector is a small DOM selector object with support for the most used selectors. It's also the default selector for the jLim JavaScript framework. Why use SimpleSelector? - very small, less than 2kb minified - easy to use with $$() - no...
1 742 posted 13 years ago by freelancephp
Basic create element and append it too another element.
0 576 posted 13 years ago by jasonseney
« Prev 1 2 3