<?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>cat brain.stuff &#62; wordpress &#187; jquery</title>
	<atom:link href="http://famvdploeg.com/blog/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://famvdploeg.com/blog</link>
	<description>A simple look on things</description>
	<lastBuildDate>Wed, 21 Mar 2012 19:47:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>jQuery + CSS3 rotating panel</title>
		<link>http://famvdploeg.com/blog/2012/01/jquery-css3-rotating-panel/</link>
		<comments>http://famvdploeg.com/blog/2012/01/jquery-css3-rotating-panel/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 19:58:07 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[flip]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[rotate]]></category>
		<category><![CDATA[rotate panel]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=289</guid>
		<description><![CDATA[This is just a small proof of concept (so don&#8217;t blame me for the lame CSS I created. ). I found out it can be done nicer. (Read this awesome article about flip effects) I only do 90 degree rotations on the Y-axis and do no backside-hiding. The idea is that a visible panel is [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a small proof of concept (so don&#8217;t blame me for the lame CSS I created. <img src='http://famvdploeg.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
I found out it can be done nicer. (<a href="http://line25.com/articles/super-cool-css-flip-effect-with-webkit-animation">Read this awesome article about flip effects</a>) I only do 90 degree rotations on the Y-axis and do no backside-hiding.</p>
<p>The idea is that a visible panel is seemingly rotated and the backside becomes visible. This works by using transition events. The 1st panel is visible at start and the 2nd panel is hidden. Then when an event is triggered (Hovered in this example) the 1st panel will be rotated 90 degrees (y-axis). The panel is then invisible the animation is ended and an event is triggered. At that point the 2nd panel is made visible and an class is added to trigger to animate it from 90 degrees back to 0 degrees. Thus creating an animation which makes it seem like the panel was completely rotated.</p>
<p>The implementation is currently only working for webkit based browsers.</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">style</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;</span> 
		div#slide1
		{
		    width:100px;
		    height:100px;
		    background:red;
		    -webkit-transition: -webkit-transform 0.5s ease-in;
		}
&nbsp;
		div#slide2
		{
		    width:100px;
		    height:100px;
		    background:green;
		    -webkit-transform: rotateY(90deg);
		    -webkit-transition: -webkit-transform 0.5s ease-in;
		}
&nbsp;
		div#slide1:hover
		{
		    -webkit-transform: rotateY(90deg);
		}
&nbsp;
		div#slide2.foo
		{
		    -webkit-transform: rotateY(0deg);
		}
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">style</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
		document.addEventListener(
			'webkitTransitionEnd', 
			function( event ) {
				$(&quot;#slide1&quot;).hide();
				$(&quot;#slide2&quot;).show().addClass(&quot;foo&quot;);
			}, false );
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">b</span>&gt;</span>Note:<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">b</span>&gt;</span> This example does not work in Internet Explorer.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;slide1&quot;</span>&gt;</span>Test<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;slide2&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;display: none;&quot;</span>&gt;</span>Awesome<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>Hover over the div element above, to see the transition effect.<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2012/01/jquery-css3-rotating-panel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery fancybox with ajax content.</title>
		<link>http://famvdploeg.com/blog/2010/10/jquery-fancybox-with-ajax-content/</link>
		<comments>http://famvdploeg.com/blog/2010/10/jquery-fancybox-with-ajax-content/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 13:43:37 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[fancybox]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=195</guid>
		<description><![CDATA[There are several ways to do this I guess. What I wanted was a default css class which I could apply to an anchor tag and have a specific part of the content loaded in fancybox. This is what I came up with. It is also possible to do this with the ajax property of [...]]]></description>
			<content:encoded><![CDATA[<p>There are several ways to do this I guess. What I wanted was a default css class which I could apply to an anchor tag and have a specific part of the content loaded in fancybox. This is what I came up with. It is also possible to do this with the ajax property of fancybox itself I suppose.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<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: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a.ajaxcontent&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span>
        <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>event<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            event.<span style="color: #660066;">preventDefault</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #003366; font-weight: bold;">var</span> url <span style="color: #339933;">=</span> jQuery<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;href&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            $.<span style="color: #660066;">get</span><span style="color: #009900;">&#40;</span>
                url<span style="color: #339933;">,</span>
                <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #003366; font-weight: bold;">var</span> content <span style="color: #339933;">=</span> jQuery<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#content&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    $.<span style="color: #660066;">fancybox</span><span style="color: #009900;">&#40;</span>content<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>
        <span style="color: #009900;">&#125;</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>

]]></content:encoded>
			<wfw:commentRss>http://famvdploeg.com/blog/2010/10/jquery-fancybox-with-ajax-content/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Greasemonkey + jQuery = 1337</title>
		<link>http://famvdploeg.com/blog/2010/07/greasemonkey-jquery-1337/</link>
		<comments>http://famvdploeg.com/blog/2010/07/greasemonkey-jquery-1337/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 12:58:28 +0000</pubDate>
		<dc:creator>Wytze</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://famvdploeg.com/blog/?p=180</guid>
		<description><![CDATA[Got some inspiration from this site for the base script: click I wanted a site to always show the answer &#8216;Ja&#8217; (Dutch for yes). Which was normally only shown at a specific time. (The question was if you could start drinking beer. ) Here is the full script: // ==UserScript== // @name ishetalbiertijd.user.js // @namespace [...]]]></description>
			<content:encoded><![CDATA[<p>Got some inspiration from this site for the base script: <a href="http://joanpiedra.com/jquery/greasemonkey/">click</a></p>
<p>I wanted a site to always show the answer &#8216;Ja&#8217; (Dutch for yes). Which was normally only shown at a specific time. (The question was if you could start drinking beer. <img src='http://famvdploeg.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<p>Here is the full script:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// ==UserScript==</span>
<span style="color: #006600; font-style: italic;">// @name           ishetalbiertijd.user.js</span>
<span style="color: #006600; font-style: italic;">// @namespace      http://famvdploeg.com/greasemonkey</span>
<span style="color: #006600; font-style: italic;">// @include        http://www.ishetalbiertijd.nl/*</span>
<span style="color: #006600; font-style: italic;">// ==/UserScript==</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> $<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Add jQuery</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: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> unsafeWindow.<span style="color: #660066;">jQuery</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> GM_Head <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'head'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">||</span> document.<span style="color: #660066;">documentElement</span><span style="color: #339933;">,</span>
			GM_JQ <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		GM_JQ.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'</span><span style="color: #339933;">;</span>
		GM_JQ.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
		GM_JQ.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
		GM_Head.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>GM_JQ<span style="color: #339933;">,</span> GM_Head.<span style="color: #660066;">firstChild</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	GM_wait<span style="color: #009900;">&#40;</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: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// Check if jQuery's loaded</span>
<span style="color: #003366; font-weight: bold;">function</span> GM_wait<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> unsafeWindow.<span style="color: #660066;">jQuery</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		window.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span>GM_wait<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: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
		$ <span style="color: #339933;">=</span> unsafeWindow.<span style="color: #660066;">jQuery</span>.<span style="color: #660066;">noConflict</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		letsJQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// All your GM code must be inside this function</span>
<span style="color: #003366; font-weight: bold;">function</span> letsJQuery<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;">//@require does not work for us...</span>
&nbsp;
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'span#answer'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Jaaa!'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#datum'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">replaceWith</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;span style=&quot;font-size: 200%; font-weight:bold; color:white&quot;&gt;Het kan nu!&lt;/span&gt;'</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://famvdploeg.com/blog/2010/07/greasemonkey-jquery-1337/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

