<?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>Interaction Designer Craig Dennis &#187; Plugin</title>
	<atom:link href="http://craigmdennis.com/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://craigmdennis.com</link>
	<description>The portfolio &#38; blog for Craig Dennis, an Interaction Designer based in South East England</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:11:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>jQuery plugin to use CSS3 animations (animate.css)</title>
		<link>http://craigmdennis.com/jquery-plugin-to-use-css3-animations/</link>
		<comments>http://craigmdennis.com/jquery-plugin-to-use-css3-animations/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 20:38:23 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[animate.css]]></category>
		<category><![CDATA[animations]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery animateCSS]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://craigmdennis.com/?p=2532</guid>
		<description><![CDATA[A while back, I stumbled across a very nice set of CSS3 animations by Dan Eden which (if you haven&#8217;t already clicked the link and looked for yourself) are plug and play. All you do is add a class to the element you want to animate and it&#8230; well&#8230; animates. This is great! Dan recommends that... <a class="more" href="http://craigmdennis.com/jquery-plugin-to-use-css3-animations/">Read more &#8594;</a>]]></description>
			<content:encoded><![CDATA[<p>A while back, I stumbled across a <a title="animate.css" href="http://daneden.me/animate/" target="_blank">very nice set of CSS3 animations </a>by Dan Eden which (if you haven&#8217;t already clicked the link and looked for yourself) are plug and play. All you do is add a class to the element you want to animate and it&#8230; well&#8230; animates. This is great! Dan recommends that you use something like <code>$('.bouncy').addClass('bounceInDown');</code> to add the class with jQuery and this is the simplest method to get you started. In fact this is the method I used when I started my site redesign.</p>
<p>I quickly ran into issues though. Now, it wasn&#8217;t anything that animate.css does or doesn&#8217;t do. More the fact that there was no way to replace jQuery animations with the CSS3 fancy-pants ones.</p>
<h2>&#8220;What did you do?&#8221; I hear you ask.</h2>
<p>Well, I&#8217;ll tell you.<a href="https://gist.github.com/1438197/3629f4f16dd37b629606daafaa8bf8da2ac46130" target="_blank"> I wrote a little function</a> that handled adding the classes to any element dynamically. This gave me a little improvement in terms of ease of use and speed. There was still something missing though. I only realised when I had 3 animations that needed to run one after each other, that there was no way to determine when a CSS3 animation had completed so I could run another one. In the interim I set a delay parameter so I could say &#8216;do this, wait 3 seconds then do this&#8217;.</p>
<p>This &#8216;callback&#8217; functionality does exist and CSS3 animations do indeed trigger an event when they finish, you just need to set a javascript event listener to detect that so you can apply some actions. After a little Googling I added this to my function. This now worked in a very similar way to jQuery&#8217;s own animate function so it was very familiar.</p>
<h2>Then came the plugin</h2>
<p>A few weeks later, Dan (<a title="Follow Dan Eden on Twitter" href="http://twitter.com/_dte" target="_blank">@_dte</a>) mentioned me in a tweet saying that my site was using his animate.css and looked good. I thanked him and showed him my jQuery function that helped. <a title="View the Tweet on Twitter" href="https://twitter.com/#!/_dte/status/144043920148545536" target="_blank">He seemed suitably impressed</a> and asked if he could use it. It was already a public gist on github so I said no problem. That evening I decided it would be even better if it was an actual plugin that could be used in an even similar way to jQuery&#8217;s native functions. And so <a title="Get jQuery animateCSS on GitHub" href="https://github.com/craigmdennis/animateCSS" target="_blank">jQuery animateCSS</a> was born.</p>
<p>To use it is pretty easy.</p>
<h3>Basic</h3>
<pre>$('#your-id').animateCSS('fadeIn');</pre>
<h3>With callback</h3>
<pre>$('#your-id').animateCSS('fadeIn', function(){
    alert('Boom! Animation Complete');
});</pre>
<h3>With delay (in ms)</h3>
<pre>$('#your-id').animateCSS('fadeIn', 500);</pre>
<h3>With delay AND callback</h3>
<pre>$('#your-id').animateCSS('fadeIn', 1000, function(){
    alert('Boom! Animation Complete');
});</pre>
<p>If you want to hide an element when the page loads and then apply an effect, it might look something like this:</p>
<pre>&lt;style&gt;
    .js #your-id {
        visibility:hidden;
    }
&lt;/style&gt;

$(window).load( function(){
    $('#your-id').animateCSS('fadeIn', 1000, function(){
        alert('Boom! Animation Complete');
    });
});</pre>
<p>Remember to use a .js (or .no-js depending on how you role) so that the element still displays for non javascript users (and Google previews).</p>
<p>Again, the plugin is available here: <a href="https://github.com/craigmdennis/animateCSS/">https://github.com/craigmdennis/animateCSS/</a></p>
<p>That&#8217;s it guys. Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigmdennis.com/jquery-plugin-to-use-css3-animations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nice Day For A Camera &amp; Flickr</title>
		<link>http://craigmdennis.com/nice-day-for-a-camera-flickr/</link>
		<comments>http://craigmdennis.com/nice-day-for-a-camera-flickr/#comments</comments>
		<pubDate>Sat, 24 May 2008 15:19:06 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Plugin]]></category>

		<guid isPermaLink="false">http://craigmdennis.com/?p=567</guid>
		<description><![CDATA[I have started using Flickr to manage my photos as WordPress doesn&#8217;t do what I want to with any degree of ease so I bought a Flickr Pro account for £12 for a year giving me unlimited space and sets. I am now looking for a good WordPress Flickr plugin so that I can display... <a class="more" href="http://craigmdennis.com/nice-day-for-a-camera-flickr/">Read more &#8594;</a>]]></description>
			<content:encoded><![CDATA[<p>I have started using Flickr to manage my photos as WordPress doesn&#8217;t do what I want to with any degree of ease so I bought a Flickr Pro account for  £12 for a year giving me unlimited space and sets. I am now looking for a good WordPress Flickr plugin so that I can display the images here. I have tested and seems to work after some tweaking and googling.</p>
<p><a title="Pruple Flowers" href="http://www.flickr.com/photos/26968630@N08/2528356873/" target="_blank"><img src="http://static.flickr.com/2324/2528356873_355c8831dd.jpg" alt="Pruple Flowers" /></a></p>
<p>Click the image to view the set in Flickr.</p>
]]></content:encoded>
			<wfw:commentRss>http://craigmdennis.com/nice-day-for-a-camera-flickr/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: craigmdennis.com @ 2012-02-10 12:37:51 by W3 Total Cache -->
