<?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>Stylephreak Web Productions &#187; CSS</title>
	<atom:link href="http://www.stylephreak.com/blog/tag/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.stylephreak.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 24 Sep 2009 07:40:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jQuery.loadStylesheet</title>
		<link>http://www.stylephreak.com/blog/coding/jquery-loadstylesheet-5</link>
		<comments>http://www.stylephreak.com/blog/coding/jquery-loadstylesheet-5#comments</comments>
		<pubDate>Mon, 17 Nov 2008 21:30:20 +0000</pubDate>
		<dc:creator>anthony</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.stylephreak.com/?p=5</guid>
		<description><![CDATA[<p>I needed a simple function to load a media-specific stylesheet on-the-fly and came up with this jQuery function. You feed it two parameters, the stylesheet name and the media type, and jQuery takes it from there.</p>
<p><span id="more-5"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// load stylesheet(name,media)</span>
loadStylesheet <span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #339933;">,</span>m<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
    &#60;link rel=&#34;style&#8230;</span></pre></div></div>]]></description>
			<content:encoded><![CDATA[<p>I needed a simple function to load a media-specific stylesheet on-the-fly and came up with this jQuery function. You feed it two parameters, the stylesheet name and the media type, and jQuery takes it from there.</p>
<p><span id="more-5"></span></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// load stylesheet(name,media)</span>
loadStylesheet <span style="color: #339933;">:</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>e<span style="color: #339933;">,</span>m<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">append</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'
    &lt;link rel=&quot;stylesheet&quot; href=&quot;'</span><span style="color: #339933;">+</span>e<span style="color: #339933;">+</span><span style="color: #3366CC;">'.css&quot; type=&quot;text/css&quot; media=&quot;'</span><span style="color: #339933;">+</span>m<span style="color: #339933;">+</span><span style="color: #3366CC;">' /&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  loadStylesheet<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'test'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">'screen'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.stylephreak.com/blog/coding/jquery-loadstylesheet-5/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
