<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>remove &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/remove/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>Remove DOM Element with JQuery</title>
		<link>/2009/05/25/remove-dom-element-with-jquery/</link>
		<comments>/2009/05/25/remove-dom-element-with-jquery/#comments</comments>
		<pubDate>Mon, 25 May 2009 06:45:38 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[remove]]></category>
		<category><![CDATA[unbind]]></category>

		<guid isPermaLink="false">/?p=577</guid>
		<description><![CDATA[JQuery and DOM JQuery is one of the most famous JavaScript library online. There are so much articles in the web about it, that I feel useless to describe it again. The good parts of that library is the amazing way it handles the DOM. It is so good at that that I usually use &#8230; <a href="/2009/05/25/remove-dom-element-with-jquery/" class="more-link">Continue reading <span class="screen-reader-text">Remove DOM Element with JQuery</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2009/07/04/jquery-check-for-element-existence-in-the-dom/" rel="bookmark" title="jquery check for element existence in the DOM">jquery check for element existence in the DOM </a></li>
<li><a href="/2009/06/17/mouseclick-outside-a-dom-element/" rel="bookmark" title="mouseclick outside a DOM element">mouseclick outside a DOM element </a></li>
<li><a href="/2009/07/08/jquery-check-for-element-visibility/" rel="bookmark" title="jQuery check for element visibility">jQuery check for element visibility </a></li>
<li><a href="/2009/12/30/jquery-live-vs-bind-performance/" rel="bookmark" title="jQuery live() vs bind() performance">jQuery live() vs bind() performance </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>JQuery and DOM</h2>
<p><a title="JQuery" href="http://jquery.com/" target="_blank">JQuery</a> is one of the most famous JavaScript library online. There are so much articles in the web about it, that I feel useless to describe it again. The good parts of that library is the amazing way it handles the DOM. It is so good at that that I usually use it with other JavaScript libraries.</p>
<p>Now I&#8217;m working on a task and one of the main target of the completed task was the RAM usage of the code. It just has about 100 dynamic DOM elements which on every event should be removed form the tree and the RAM should be freed.<span id="more-577"></span></p>
<h2>Unbind first</h2>
<p>The first simple sub-task was to remove the event listeners. The problem is that if you don&#8217;t remove the event listeners may result in memory leaks in JS. The way JQuery removes the event listeners is with:</p>
<blockquote><p>$(element).unbind()</p></blockquote>
<p>That&#8217;s enough. Now the element don&#8217;t have any event listeners attached to it.</p>
<h2>Remove</h2>
<p>Now you must just remove the element from the tree with no fear of memory leaks, with just writing:</p>
<blockquote><p>$(element).remove()</p></blockquote>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2009/07/04/jquery-check-for-element-existence-in-the-dom/" rel="bookmark" title="jquery check for element existence in the DOM">jquery check for element existence in the DOM </a></li>
<li><a href="/2009/06/17/mouseclick-outside-a-dom-element/" rel="bookmark" title="mouseclick outside a DOM element">mouseclick outside a DOM element </a></li>
<li><a href="/2009/07/08/jquery-check-for-element-visibility/" rel="bookmark" title="jQuery check for element visibility">jQuery check for element visibility </a></li>
<li><a href="/2009/12/30/jquery-live-vs-bind-performance/" rel="bookmark" title="jQuery live() vs bind() performance">jQuery live() vs bind() performance </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2009/05/25/remove-dom-element-with-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
