<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Rails Forum - Ruby on Rails Help and Discussion Forum - Best practice for creating an HTML element on-the-fly?]]></title>
		<link>http://railsforum.com/viewtopic.php?id=44073</link>
		<description><![CDATA[The most recent posts in Best practice for creating an HTML element on-the-fly?.]]></description>
		<lastBuildDate>Fri, 20 May 2011 19:10:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Best practice for creating an HTML element on-the-fly?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=140522#p140522</link>
			<description><![CDATA[<p>I was wondering if that is considered a good practice to do, though.&nbsp; Should I create/delete the element when I want to use it or just show/hide the element that&#039;s already there?&nbsp; I just wasn&#039;t sure what the best practice or accepted solution was.</p>]]></description>
			<author><![CDATA[dummy@example.com (daniel_l)]]></author>
			<pubDate>Fri, 20 May 2011 19:10:02 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=140522#p140522</guid>
		</item>
		<item>
			<title><![CDATA[Re: Best practice for creating an HTML element on-the-fly?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=140514#p140514</link>
			<description><![CDATA[<p>You can create whatever you want with jQuery for example and insert this HTML code whenever you want on your page.</p>]]></description>
			<author><![CDATA[dummy@example.com (Javix)]]></author>
			<pubDate>Fri, 20 May 2011 13:49:41 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=140514#p140514</guid>
		</item>
		<item>
			<title><![CDATA[Best practice for creating an HTML element on-the-fly?]]></title>
			<link>http://railsforum.com/viewtopic.php?pid=140509#p140509</link>
			<description><![CDATA[<p>I have a modal mask (a semi-transparent div that covers the entire screen so user can&#039;t interact with rest of app) that I&#039;m using for an app.&nbsp; However, to use the mask I&#039;m just leaving an empty div on the layout like this:</p><div class="codebox"><pre><code>&lt;div id=&quot;mask&quot;&gt;&lt;/div&gt;</code></pre></div><p>The CSS takes care of the rest and then I show/hide the mask as needed with JS.&nbsp; It works, but is there a cleaner solution to this?&nbsp; Do I really need a blank div on the layout just taking up space?&nbsp; I&#039;m thinking it would be cleaner to create the div dynamically with JS whenever I need the mask but I wasn&#039;t sure if this is a really good practice or looked down upon.</p><p>I&#039;m curious how others do something like this.&nbsp; Is it a good idea to create the mask div on the fly and then delete it when the mask is hidden then recreate, etc... ?</p>]]></description>
			<author><![CDATA[dummy@example.com (daniel_l)]]></author>
			<pubDate>Fri, 20 May 2011 13:16:32 +0000</pubDate>
			<guid>http://railsforum.com/viewtopic.php?pid=140509#p140509</guid>
		</item>
	</channel>
</rss>
