<?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>pixelbreaker &#187; jQuery</title>
	<atom:link href="http://blog.pixelbreaker.com/category/jquery/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.pixelbreaker.com</link>
	<description></description>
	<lastBuildDate>Wed, 11 Jan 2012 17:01:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>jQuery Takeover Loader</title>
		<link>http://blog.pixelbreaker.com/jquery/takeover-loader</link>
		<comments>http://blog.pixelbreaker.com/jquery/takeover-loader#comments</comments>
		<pubDate>Sat, 11 Jun 2011 22:21:29 +0000</pubDate>
		<dc:creator>gabes</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.pixelbreaker.com/?p=177</guid>
		<description><![CDATA[A really simple jQuery plugin I&#8217;ve just written for my portfolio part of this site. When the document is &#8216;ready&#8217; call takeoverloader() on jQuery results (desired DOM elements). In my case I used $(document). It will then track all img elements in the children of your chosen element and report progress and completion of the [...]]]></description>
			<content:encoded><![CDATA[<p>A really simple jQuery plugin I&#8217;ve just written for <a href="http://www.pixelbreaker.com">my portfolio</a> part of this site.</p>
<p>When the document is &#8216;ready&#8217; call takeoverloader() on jQuery results (desired DOM elements). In my case I used $(document). It will then track all <code>img</code> elements in the children of your chosen element and report progress and completion of the loading process.</p>
<p>It will ignore <code>img</code> tags with an empty <code>src</code> attribute, or a class of <code>.noloader</code></p>
<p>So you&#8217;re initial code would be something along these lines:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<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>
	<span style="color: #006600; font-style: italic;">// hide content div (UI being loaded)</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #006600; font-style: italic;">// takeover the loading.</span>
	$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">takeoverloader</span><span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#123;</span>
		progress<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span> progressAmount <span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// called each time an item is loaded</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #006600; font-style: italic;">// do something with progressAmout (normalised)</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.loadprogress'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span> Math.<span style="color: #660066;">round</span><span style="color: #009900;">&#40;</span> progressAmount <span style="color: #339933;">*</span> <span style="color: #CC0000;">100</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'%'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
		complete<span style="color: #339933;">:</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: #006600; font-style: italic;">// called when loading is finished</span>
			<span style="color: #009900;">&#123;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.loadprogress'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#content'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fadeIn</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #006600; font-style: italic;">// etc</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// To forcibly remove events, call 'destroy'</span>
	$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">takeoverloader</span><span style="color: #009900;">&#40;</span> <span style="color: #3366CC;">'destroy'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>It&#8217;s up on github, and there&#8217;s also a minified (google closure compiled) version in the repo too.</p>
<p>Links:<br />
<a href="http://github.com/pixelbreaker/pixelbreaker_jquery/tree/master/takeoverloader" target="_blank">http://github.com/pixelbreaker/pixelbreaker_jquery/tree/master/takeoverloader</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pixelbreaker.com/jquery/takeover-loader/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>jQuery plugins coming soon.</title>
		<link>http://blog.pixelbreaker.com/jquery/jquery-plugins-coming-soon</link>
		<comments>http://blog.pixelbreaker.com/jquery/jquery-plugins-coming-soon#comments</comments>
		<pubDate>Wed, 09 Dec 2009 16:32:09 +0000</pubDate>
		<dc:creator>gabes</dc:creator>
				<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://blog.pixelbreaker.com/flash/jquery-plugins-coming-soon/</guid>
		<description><![CDATA[Pretty soon, I&#8217;ll be releasing two plugins for jQuery. They are re-writes of my current javascript extensions to SWFObject. One for full browser flash with a minimum width and height. And an updated version of the MouseWheel enabler for Macs. I&#8217;ve gone for jQuery as I&#8217;ve been using it a fair bit recently with jQuery [...]]]></description>
			<content:encoded><![CDATA[<p>Pretty soon, I&#8217;ll be releasing two plugins for jQuery.</p>
<p>They are re-writes of my current javascript extensions to SWFObject. One for full browser flash with a minimum width and height. And an updated version of the MouseWheel enabler for Macs.</p>
<p>I&#8217;ve gone for jQuery as I&#8217;ve been using it a fair bit recently with <a href="http://jquery.thewikies.com/swfobject/" target="_blank">jQuery SWFObject</a>, and it&#8217;s super easy to work with.</p>
<p>Here&#8217;s an example of a full browser flash object, with a minimum width/height. The best thing being that there is no requirement for fiddly CSS to make the full browser view work, the CSS is all implemented by jQuery!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">$<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>
	<span style="color: #006600; font-style: italic;">// add an extra class to the &lt;body&gt; element for JS-only styling</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;body&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	$.<span style="color: #660066;">flash</span>.<span style="color: #660066;">expressInstaller</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'_includes/expressInstall.swf'</span><span style="color: #339933;">;</span> 
&nbsp;
	<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> $.<span style="color: #660066;">flash</span>.<span style="color: #660066;">hasVersion</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">9.1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> mainFlash <span style="color: #339933;">=</span> $.<span style="color: #660066;">flash</span>.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span>
			<span style="color: #009900;">&#123;</span>   
				swf<span style="color: #339933;">:</span> <span style="color: #3366CC;">'FlashApplication.swf'</span><span style="color: #339933;">,</span>
				width<span style="color: #339933;">:</span> <span style="color: #3366CC;">'100%'</span><span style="color: #339933;">,</span>
				height<span style="color: #339933;">:</span> <span style="color: #3366CC;">'100%'</span><span style="color: #339933;">,</span>
				id<span style="color: #339933;">:</span> <span style="color: #3366CC;">'FlashApplicationSwf'</span><span style="color: #339933;">,</span>
				<span style="color: #000066;">name</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'FlashApplicationSwf'</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		SWFAddress.<span style="color: #660066;">setId</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'FlashApplication'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flashContent'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span> mainFlash <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#flashContent'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">fullFlashMinSize</span><span style="color: #009900;">&#40;</span> <span style="color: #CC0000;">800</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">600</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>		
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.pixelbreaker.com/jquery/jquery-plugins-coming-soon/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

