<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/javascript/tags/DOM</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 25 May 2013 10:03:17 GMT</pubDate>
<item>
<title>(JavaScript) Dynamic Table Generator - COBOLdinosaur</title>
<link>http://snipplr.com/view/70654/dynamic-table-generator/</link>
<description><![CDATA[ <p>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 it is unstructured, or not appropriately tagged. The solution is to dynamically build the necessary structures to make the data presentable in a web page</p> ]]></description>
<pubDate>Thu, 04 Apr 2013 07:15:15 GMT</pubDate>
<guid>http://snipplr.com/view/70654/dynamic-table-generator/</guid>
</item>
<item>
<title>(JavaScript) Javascript DOM Create Element - flamboyanz</title>
<link>http://snipplr.com/view/69973/javascript-dom-create-element/</link>
<description><![CDATA[ <p>Javascript DOM Create Element</p> ]]></description>
<pubDate>Mon, 18 Feb 2013 04:10:53 GMT</pubDate>
<guid>http://snipplr.com/view/69973/javascript-dom-create-element/</guid>
</item>
<item>
<title>(JavaScript) Get DOM element via class and id selector, using Google Closure - cjcenizal</title>
<link>http://snipplr.com/view/62931/get-dom-element-via-class-and-id-selector-using-google-closure/</link>
<description><![CDATA[ <p>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 element with an id of 'links', within the element of class 'sidebar', within the element of id 'home'.</p> ]]></description>
<pubDate>Tue, 31 Jan 2012 15:00:26 GMT</pubDate>
<guid>http://snipplr.com/view/62931/get-dom-element-via-class-and-id-selector-using-google-closure/</guid>
</item>
<item>
<title>(JavaScript) getElementsFromClassName - jatkins</title>
<link>http://snipplr.com/view/60653/getelementsfromclassname/</link>
<description><![CDATA[ <p>Released into the public domain.</p> ]]></description>
<pubDate>Wed, 09 Nov 2011 10:07:09 GMT</pubDate>
<guid>http://snipplr.com/view/60653/getelementsfromclassname/</guid>
</item>
<item>
<title>(JavaScript) Search for objects attached to the global JS object - richt</title>
<link>http://snipplr.com/view/58681/search-for-objects-attached-to-the-global-js-object/</link>
<description><![CDATA[ <p>Simple recursive function to find objects that match the value of str hanging anywhere off the global JS object (window).</p> ]]></description>
<pubDate>Thu, 15 Sep 2011 00:15:22 GMT</pubDate>
<guid>http://snipplr.com/view/58681/search-for-objects-attached-to-the-global-js-object/</guid>
</item>
<item>
<title>(JavaScript) isEmail Function - alberomo</title>
<link>http://snipplr.com/view/58073/isemail-function/</link>
<description><![CDATA[ <p>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</p> ]]></description>
<pubDate>Mon, 22 Aug 2011 00:27:59 GMT</pubDate>
<guid>http://snipplr.com/view/58073/isemail-function/</guid>
</item>
<item>
<title>(JavaScript) isFilled (form element) Function - alberomo</title>
<link>http://snipplr.com/view/58072/isfilled-form-element-function/</link>
<description><![CDATA[ <p>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</p> ]]></description>
<pubDate>Mon, 22 Aug 2011 00:15:36 GMT</pubDate>
<guid>http://snipplr.com/view/58072/isfilled-form-element-function/</guid>
</item>
<item>
<title>(JavaScript) focusLebels Function - alberomo</title>
<link>http://snipplr.com/view/58069/focuslebels-function/</link>
<description><![CDATA[ <p>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 Jeremy Keith</p> ]]></description>
<pubDate>Sun, 21 Aug 2011 20:05:42 GMT</pubDate>
<guid>http://snipplr.com/view/58069/focuslebels-function/</guid>
</item>
<item>
<title>(JavaScript) previousElement and nextElement - jatkins</title>
<link>http://snipplr.com/view/56845/previouselement-and-nextelement/</link>
<description><![CDATA[ <p>Released into the public domain. I haven't tested these (realized I didn't need them for what I was trying to do), but they should work. **Bug fixed 7/19/2011.**</p> ]]></description>
<pubDate>Tue, 19 Jul 2011 07:24:59 GMT</pubDate>
<guid>http://snipplr.com/view/56845/previouselement-and-nextelement/</guid>
</item>
<item>
<title>(JavaScript) Retrieve only childNodes that are HTML elements - jatkins</title>
<link>http://snipplr.com/view/51897/retrieve-only-childnodes-that-are-html-elements/</link>
<description><![CDATA[ <p>Released into the public domain. **Example:** `elementNodes(document.getElementById('content'))` refers to an array of all the elements inside the element with the ID _content_.</p> ]]></description>
<pubDate>Mon, 11 Apr 2011 01:46:16 GMT</pubDate>
<guid>http://snipplr.com/view/51897/retrieve-only-childnodes-that-are-html-elements/</guid>
</item>
<item>
<title>(JavaScript) Find an element higher in the DOM hierarchy - jatkins</title>
<link>http://snipplr.com/view/51182/find-an-element-higher-in-the-dom-hierarchy/</link>
<description><![CDATA[ <p>Released into the public domain. `startElmnt` is a reference to the lower element, e.g. `document.getElementById('tdName')` and `endElmntTagName` is just that (capitalization irrelevant, thanks to [Sitepoint](http://reference.sitepoint.com/javascript/Node/nodeName)), e.g. `TBODY`.</p> ]]></description>
<pubDate>Mon, 28 Mar 2011 00:50:07 GMT</pubDate>
<guid>http://snipplr.com/view/51182/find-an-element-higher-in-the-dom-hierarchy/</guid>
</item>
<item>
<title>(JavaScript) accessing the DOM of a page loaded in an iframe [javascript] [dom] [iframe] [for-twitter] - Thammas</title>
<link>http://snipplr.com/view/50825/accessing-the-dom-of-a-page-loaded-in-an-iframe-javascript-dom-iframe-fortwitter/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 18 Mar 2011 22:43:42 GMT</pubDate>
<guid>http://snipplr.com/view/50825/accessing-the-dom-of-a-page-loaded-in-an-iframe-javascript-dom-iframe-fortwitter/</guid>
</item>
<item>
<title>(JavaScript) Swap child nodes - jatkins</title>
<link>http://snipplr.com/view/50142/swap-child-nodes/</link>
<description><![CDATA[ <p>Released into the public domain. **Update 7/20/2011: Rewritten with a method that shouldn't lose values/selected files/etc. Earlier versions based on a solution found on [Stack Overflow](http://www.stackoverflow.com).**</p> ]]></description>
<pubDate>Sun, 06 Mar 2011 02:08:53 GMT</pubDate>
<guid>http://snipplr.com/view/50142/swap-child-nodes/</guid>
</item>
<item>
<title>(JavaScript) HTML element generator - jatkins</title>
<link>http://snipplr.com/view/47720/html-element-generator/</link>
<description><![CDATA[ <p>Released into the public domain. `elementType` is a string of the tag name (e.g. 'fieldset', 'div', etc.); `attributes` can be left null or is a multidimensional array of attributes (e.g. an `onclick` attribute resulting in `alert(123);` is passed as `['onclick', 'alert(123);']`); `childrenToAppend` can be left null or is an array of already-created elements or an array of `generateElement()` calls; `innerHTML` can be left blank is a string containing the HTML to be placed inside the element. IE fix via http://www.sitepoint.com/forums/javascript-15/setattribute-not-working-ie-470313.html#post3345178.</p> ]]></description>
<pubDate>Sat, 22 Jan 2011 23:20:20 GMT</pubDate>
<guid>http://snipplr.com/view/47720/html-element-generator/</guid>
</item>
<item>
<title>(JavaScript) fnGet - rupertbreheny</title>
<link>http://snipplr.com/view/46297/fnget/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 31 Dec 2010 00:04:37 GMT</pubDate>
<guid>http://snipplr.com/view/46297/fnget/</guid>
</item>
<item>
<title>(JavaScript) prototype check if element exists - dmistriotis</title>
<link>http://snipplr.com/view/40420/prototype-check-if-element-exists/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 13 Sep 2010 20:31:35 GMT</pubDate>
<guid>http://snipplr.com/view/40420/prototype-check-if-element-exists/</guid>
</item>
<item>
<title>(JavaScript) Create new DOM element - stephcode</title>
<link>http://snipplr.com/view/39978/create-new-dom-element/</link>
<description><![CDATA[ <p>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. [...] This is very important. This now means that we can provide CSS styling for undefined HTML 5 element and allow Internet Explorer to handle it gracefully.</p> ]]></description>
<pubDate>Sat, 04 Sep 2010 01:48:44 GMT</pubDate>
<guid>http://snipplr.com/view/39978/create-new-dom-element/</guid>
</item>
<item>
<title>(JavaScript) Check if DOM Element is Fully Visible - iloveitaly</title>
<link>http://snipplr.com/view/39594/check-if-dom-element-is-fully-visible/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 27 Aug 2010 09:36:38 GMT</pubDate>
<guid>http://snipplr.com/view/39594/check-if-dom-element-is-fully-visible/</guid>
</item>
<item>
<title>(JavaScript) Drag-and-drop library - jatkins</title>
<link>http://snipplr.com/view/39346/draganddrop-library/</link>
<description><![CDATA[ <p>License: public domain (retention of authorship message in code is appreciated). Size: 3.94 kB. To enable drag-drop capability on one or more elements, use `enableDragDrop(elementIDArray, dropLocation);`, where elementIDArray is an array of the IDs of elements to be given drag-drop capability, and dropLocation is an optional parameter which will return the dragged elements to their original position if they are dropped outside of the perimeter of the element with the ID dropLocation. To disable drag-drop capability on one or more elements, use `disableDragDrop(elementIDArray);`.</p> ]]></description>
<pubDate>Fri, 20 Aug 2010 12:28:11 GMT</pubDate>
<guid>http://snipplr.com/view/39346/draganddrop-library/</guid>
</item>
<item>
<title>(JavaScript) jQuery: Check for existence of element - karlhorky</title>
<link>http://snipplr.com/view/37929/jquery-check-for-existence-of-element/</link>
<description><![CDATA[ <p>From the jQuery documentation:

You can use the length property of the jQuery collection returned by your selector. 

Note: It isn't always necessary to test whether an element exists. The following code would show the item if it exists, and do nothing (no errors) if it did not:</p> ]]></description>
<pubDate>Tue, 27 Jul 2010 08:12:17 GMT</pubDate>
<guid>http://snipplr.com/view/37929/jquery-check-for-existence-of-element/</guid>
</item>
</channel>
</rss>