<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>CatsWhoCode.com - Snippets Feed</title>
	
	<link>http://www.catswhocode.com/blog</link>
	<description>Web Development Blog</description>
	<lastBuildDate>Tue, 29 May 2012 14:20:03 +0000</lastBuildDate>
		<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/catswhocode-snippets" /><feedburner:info uri="catswhocode-snippets" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>YouTube Lazy Loader</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/X0Sg7kROa04/youtube-lazy-loader</link>
		<comments>http://www.catswhocode.com/blog/snippets/youtube-lazy-loader#comments</comments>
		<pubDate>Wed, 23 May 2012 09:29:52 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4967</guid>

		<description><![CDATA[Put that script on your site, then make an anchor element like this:

<pre>&#60;a class="youtube-link" href="video-page"&#62;Video Title&#60;/a&#62;</pre>

JQuery will replace your anchor with a lightweight video that will loaded only when you click!

You have to add this CSS too:

<pre>.youtube-box,
.youtube-frame {
  display:block;
  width:420px; /* video width */
  height:315px; /* video height */
  background-color:black;
  background-size:100%;
  position:relative;
  border:none;
  margin:0px auto 15px;
}

.youtube-box span {
  display:block;
  position:absolute;
  top:0px;
  right:0px;
  bottom:0px;
  left:0px;
}

.youtube-box .youtube-title {
  background-color:rgba(0,0,0,0.4);
  font:bold 15px Verdana,Arial,Sans-Serif;
  color:white;
  text-shadow:0px 1px 2px black;
  bottom:auto;
  line-height:30px;
  height:30px;
  overflow:hidden;
  padding:0px 15px;
}

.youtube-box .youtube-bar {
  background:black url('yt-bar-center.png') repeat-x top;
  height:35px;
  top:auto;
}

.youtube-box .youtube-bar .yt-bar-left {
  background:transparent url('yt-bar-left.png') no-repeat top left;
}

.youtube-box .youtube-bar .yt-bar-right {
  background:transparent url('yt-bar-right.png') no-repeat top right;
}

.youtube-box .youtube-play {
  cursor:pointer;
  width:83px;
  height:56px;
  top:50%;
  left:50%;
  margin:-28px 0px 0px -42px;
  background:transparent url('yt-play.png') no-repeat top left;
}

.youtube-box .youtube-play:hover {
  background-position:bottom left;
}</pre>]]></description>
	
		<content:encoded><![CDATA[<pre>$(function() {
    $('a.youtube-link').each(function() {
        var yt_url   = this.href,
            yt_id    = yt_url.split('?v=')[1],
            yt_title = $(this).text();
        $(this).replaceWith('&lt;div class=&quot;youtube-box&quot; style=&quot;background-image:url(http://img.youtube.com/vi/' + yt_id + '/0.jpg);&quot;&gt;&lt;span class=&quot;youtube-title&quot;&gt;' + yt_title + '&lt;/span&gt;&lt;span class=&quot;youtube-bar&quot;&gt;&lt;span class=&quot;yt-bar-left&quot;&gt;&lt;/span&gt;&lt;span class=&quot;yt-bar-right&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;youtube-play&quot;&gt;&lt;/span&gt;&lt;/div&gt;');
        $('div.youtube-box').click(function() {
            $(this).replaceWith('&lt;iframe class=&quot;youtube-frame&quot; src=&quot;http://www.youtube.com/embed/' + yt_id + '&quot;&gt;&lt;/iframe&gt;');
        });
    });
});</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/X0Sg7kROa04" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/youtube-lazy-loader/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/youtube-lazy-loader</feedburner:origLink></item>
	
	<item>
		<title>add WWW to URL</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/SJB1btL9O6g/add-www-to-url</link>
		<comments>http://www.catswhocode.com/blog/snippets/add-www-to-url#comments</comments>
		<pubDate>Tue, 22 May 2012 14:24:26 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4966</guid>

		<description><![CDATA[Standardizing your URL is important mostly for search engines, and like that we avoid duplicate url's for the same page.
Add this snippet to your .htacces file, and all your URL's will have WWW 
:)]]></description>
	
		<content:encoded><![CDATA[<pre>RewriteEngine On
RewriteCond %{HTTP_HOST} ^your-site.com [NC]
RewriteRule ^(.*)$ http://www.your-site.com/$1 [L,R=301]</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/SJB1btL9O6g" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/add-www-to-url/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/add-www-to-url</feedburner:origLink></item>
	
	<item>
		<title>iPhone CSS Detector</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/3YvFJhYcUv0/iphone-css-detector</link>
		<comments>http://www.catswhocode.com/blog/snippets/iphone-css-detector#comments</comments>
		<pubDate>Fri, 18 May 2012 20:34:16 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4965</guid>

		<description><![CDATA[iPhone Detector is great as it allows you to style for the iPhone device and standard web browsers. 
Simply add your iPhone stylesheet to the 'iphone.css' location and add your default stylesheet to the 'default.css' 
Good Luck &#38; Enjoy.]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;?php
  $browser = strpos($_SERVER['HTTP_USER_AGENT'],&quot;iPhone&quot;);
  if ($browser == true){$browser = 'iphone';}
?&gt;

&lt;?php if($browser == 'iphone'){ ?&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/iphone.css&quot; /&gt;
&lt;?php } else{ ?&gt;
  &lt;link rel=&quot;stylesheet&quot; href=&quot;css/default.css&quot; /&gt;
&lt;?php } ?&gt;</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/3YvFJhYcUv0" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/iphone-css-detector/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/iphone-css-detector</feedburner:origLink></item>
	
	<item>
		<title>.htaccess file caching</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/mHgT_colmsc/htaccess-file-caching</link>
		<comments>http://www.catswhocode.com/blog/snippets/htaccess-file-caching#comments</comments>
		<pubDate>Wed, 09 May 2012 09:50:56 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4903</guid>

		<description><![CDATA[paste in your .htaccess file.]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;IfModule mod_headers.c&gt;
&lt;FilesMatch &quot;.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|eot|woff|otf|ttf|svg)$&quot;&gt;
Header set Cache-Control &quot;max-age=290304000, public&quot;
&lt;/FilesMatch&gt;
&lt;/IfModule&gt;</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/mHgT_colmsc" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/htaccess-file-caching/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/htaccess-file-caching</feedburner:origLink></item>
	
	<item>
		<title>Function to create data uri’s</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/lZHTGXfkwPU/function-to-create-data-uris</link>
		<comments>http://www.catswhocode.com/blog/snippets/function-to-create-data-uris#comments</comments>
		<pubDate>Sun, 06 May 2012 11:22:32 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4908</guid>

		<description><![CDATA[These can be useful for embedding images into HTML/CSS/JS to save on HTTP requests.]]></description>
	
		<content:encoded><![CDATA[<pre>function data_uri($file, $mime) {
  $contents=file_get_contents($file);
  $base64=base64_encode($contents);
  echo &quot;data:$mime;base64,$base64&quot;;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/lZHTGXfkwPU" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/function-to-create-data-uris/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/function-to-create-data-uris</feedburner:origLink></item>
	
	<item>
		<title>Displaying Author info</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/BweqF0yxoNE/displaying-author-info</link>
		<comments>http://www.catswhocode.com/blog/snippets/displaying-author-info#comments</comments>
		<pubDate>Thu, 03 May 2012 19:13:20 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4906</guid>

		<description><![CDATA[Code displays name, Gravatar and bio (taken from User settings)]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;div class=&quot;author-box&quot;&gt;
   &lt;div class=&quot;author-pic&quot;&gt;&lt;?php echo get_avatar( get_the_author_email(), '80' ); ?&gt;&lt;/div&gt;
   &lt;div class=&quot;author-name&quot;&gt;&lt;?php the_author_meta( &quot;display_name&quot; ); ?&gt;&lt;/div&gt;
   &lt;div class=&quot;author-bio&quot;&gt;&lt;?php the_author_meta( &quot;user_description&quot; ); ?&gt;&lt;/div&gt;
&lt;/div&gt;</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/BweqF0yxoNE" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/displaying-author-info/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/displaying-author-info</feedburner:origLink></item>
	
	<item>
		<title>Month/Day/Year HTML dropdown with PHP validation</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/WJKFP-no7WU/monthdayyear-html-dropdown-with-php-validation</link>
		<comments>http://www.catswhocode.com/blog/snippets/monthdayyear-html-dropdown-with-php-validation#comments</comments>
		<pubDate>Sun, 29 Apr 2012 15:32:20 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4884</guid>

		<description><![CDATA[Super useful!]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;select name=&quot;month&quot; id=&quot;month&quot;&gt;
	&lt;option value=&quot;1&quot;  &lt;?PHP if($month==1) echo &quot;selected&quot;;?&gt;&gt;January&lt;/option&gt;
	&lt;option value=&quot;2&quot;  &lt;?PHP if($month==2) echo &quot;selected&quot;;?&gt;&gt;February&lt;/option&gt;
	&lt;option value=&quot;3&quot;  &lt;?PHP if($month==3) echo &quot;selected&quot;;?&gt;&gt;March&lt;/option&gt;
	&lt;option value=&quot;4&quot;  &lt;?PHP if($month==4) echo &quot;selected&quot;;?&gt;&gt;April&lt;/option&gt;
	&lt;option value=&quot;5&quot;  &lt;?PHP if($month==5) echo &quot;selected&quot;;?&gt;&gt;May&lt;/option&gt;
	&lt;option value=&quot;6&quot;  &lt;?PHP if($month==6) echo &quot;selected&quot;;?&gt;&gt;June&lt;/option&gt;
	&lt;option value=&quot;7&quot;  &lt;?PHP if($month==7) echo &quot;selected&quot;;?&gt;&gt;July&lt;/option&gt;
	&lt;option value=&quot;8&quot;  &lt;?PHP if($month==8) echo &quot;selected&quot;;?&gt;&gt;August&lt;/option&gt;
	&lt;option value=&quot;9&quot;  &lt;?PHP if($month==9) echo &quot;selected&quot;;?&gt;&gt;September&lt;/option&gt;
	&lt;option value=&quot;10&quot; &lt;?PHP if($month==10) echo &quot;selected&quot;;?&gt;&gt;October&lt;/option&gt;
	&lt;option value=&quot;11&quot; &lt;?PHP if($month==11) echo &quot;selected&quot;;?&gt;&gt;November&lt;/option&gt;
	&lt;option value=&quot;12&quot; &lt;?PHP if($month==12) echo &quot;selected&quot;;?&gt;&gt;December&lt;/option&gt;
&lt;/select&gt;

&lt;select name=&quot;day&quot; id=&quot;day&quot;&gt;
	&lt;option value=&quot;1&quot;  &lt;?PHP if($day==1) echo &quot;selected&quot;;?&gt;&gt;1&lt;/option&gt;
	&lt;option value=&quot;2&quot;  &lt;?PHP if($day==2) echo &quot;selected&quot;;?&gt;&gt;2&lt;/option&gt;
	&lt;option value=&quot;3&quot;  &lt;?PHP if($day==3) echo &quot;selected&quot;;?&gt;&gt;3&lt;/option&gt;
	&lt;option value=&quot;4&quot;  &lt;?PHP if($day==4) echo &quot;selected&quot;;?&gt;&gt;4&lt;/option&gt;
	&lt;option value=&quot;5&quot;  &lt;?PHP if($day==5) echo &quot;selected&quot;;?&gt;&gt;5&lt;/option&gt;
	&lt;option value=&quot;6&quot;  &lt;?PHP if($day==6) echo &quot;selected&quot;;?&gt;&gt;6&lt;/option&gt;
	&lt;option value=&quot;7&quot;  &lt;?PHP if($day==7) echo &quot;selected&quot;;?&gt;&gt;7&lt;/option&gt;
	&lt;option value=&quot;8&quot;  &lt;?PHP if($day==8) echo &quot;selected&quot;;?&gt;&gt;8&lt;/option&gt;
	&lt;option value=&quot;9&quot;  &lt;?PHP if($day==9) echo &quot;selected&quot;;?&gt;&gt;9&lt;/option&gt;
	&lt;option value=&quot;10&quot; &lt;?PHP if($day==10) echo &quot;selected&quot;;?&gt;&gt;10&lt;/option&gt;
	&lt;option value=&quot;11&quot; &lt;?PHP if($day==11) echo &quot;selected&quot;;?&gt;&gt;11&lt;/option&gt;
	&lt;option value=&quot;12&quot; &lt;?PHP if($day==12) echo &quot;selected&quot;;?&gt;&gt;12&lt;/option&gt;
	&lt;option value=&quot;13&quot; &lt;?PHP if($day==13) echo &quot;selected&quot;;?&gt;&gt;13&lt;/option&gt;
	&lt;option value=&quot;14&quot; &lt;?PHP if($day==14) echo &quot;selected&quot;;?&gt;&gt;14&lt;/option&gt;
	&lt;option value=&quot;15&quot; &lt;?PHP if($day==15) echo &quot;selected&quot;;?&gt;&gt;15&lt;/option&gt;
	&lt;option value=&quot;16&quot; &lt;?PHP if($day==16) echo &quot;selected&quot;;?&gt;&gt;16&lt;/option&gt;
	&lt;option value=&quot;17&quot; &lt;?PHP if($day==17) echo &quot;selected&quot;;?&gt;&gt;17&lt;/option&gt;
	&lt;option value=&quot;18&quot; &lt;?PHP if($day==18) echo &quot;selected&quot;;?&gt;&gt;18&lt;/option&gt;
	&lt;option value=&quot;19&quot; &lt;?PHP if($day==19) echo &quot;selected&quot;;?&gt;&gt;19&lt;/option&gt;
	&lt;option value=&quot;20&quot; &lt;?PHP if($day==20) echo &quot;selected&quot;;?&gt;&gt;20&lt;/option&gt;
	&lt;option value=&quot;21&quot; &lt;?PHP if($day==21) echo &quot;selected&quot;;?&gt;&gt;21&lt;/option&gt;
	&lt;option value=&quot;22&quot; &lt;?PHP if($day==22) echo &quot;selected&quot;;?&gt;&gt;22&lt;/option&gt;
	&lt;option value=&quot;23&quot; &lt;?PHP if($day==23) echo &quot;selected&quot;;?&gt;&gt;23&lt;/option&gt;
	&lt;option value=&quot;24&quot; &lt;?PHP if($day==24) echo &quot;selected&quot;;?&gt;&gt;24&lt;/option&gt;
	&lt;option value=&quot;25&quot; &lt;?PHP if($day==25) echo &quot;selected&quot;;?&gt;&gt;25&lt;/option&gt;
	&lt;option value=&quot;26&quot; &lt;?PHP if($day==26) echo &quot;selected&quot;;?&gt;&gt;26&lt;/option&gt;
	&lt;option value=&quot;27&quot; &lt;?PHP if($day==27) echo &quot;selected&quot;;?&gt;&gt;27&lt;/option&gt;
	&lt;option value=&quot;28&quot; &lt;?PHP if($day==28) echo &quot;selected&quot;;?&gt;&gt;28&lt;/option&gt;
	&lt;option value=&quot;29&quot; &lt;?PHP if($day==29) echo &quot;selected&quot;;?&gt;&gt;29&lt;/option&gt;
	&lt;option value=&quot;30&quot; &lt;?PHP if($day==30) echo &quot;selected&quot;;?&gt;&gt;30&lt;/option&gt;
	&lt;option value=&quot;31&quot; &lt;?PHP if($day==31) echo &quot;selected&quot;;?&gt;&gt;31&lt;/option&gt;
&lt;/select&gt;

&lt;select name=&quot;year&quot; id=&quot;year&quot;&gt;
	&lt;?PHP for($i=date(&quot;Y&quot;); $i&lt;=date(&quot;Y&quot;)+2; $i++)
		  	if($year == $i)
				echo &quot;&lt;option value='$i' selected&gt;$i&lt;/option&gt;&quot;;
			else
				echo &quot;&lt;option value='$i'&gt;$i&lt;/option&gt;&quot;;
	?&gt;
&lt;/select&gt;</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/WJKFP-no7WU" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/monthdayyear-html-dropdown-with-php-validation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/monthdayyear-html-dropdown-with-php-validation</feedburner:origLink></item>
	
	<item>
		<title>Export MySQL query results to CSV</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/hjJYx5UwT9w/export-mysql-query-results-to-csv</link>
		<comments>http://www.catswhocode.com/blog/snippets/export-mysql-query-results-to-csv#comments</comments>
		<pubDate>Fri, 27 Apr 2012 13:25:51 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4885</guid>

		<description><![CDATA[This will create a .csv file with your MySQL query results.]]></description>
	
		<content:encoded><![CDATA[<pre>// Export to CSV
if($_GET['action'] == 'export') {

	$rsSearchResults = mysql_query($sql, $db) or die(mysql_error());

	$out = '';
	$fields = mysql_list_fields('database','table',$db);
	$columns = mysql_num_fields($fields);

	// Put the name of all fields
	for ($i = 0; $i &lt; $columns; $i++) {
	$l=mysql_field_name($fields, $i);
	$out .= '&quot;'.$l.'&quot;,';
	}
	$out .=&quot;n&quot;;

	// Add all values in the table
	while ($l = mysql_fetch_array($rsSearchResults)) {
	for ($i = 0; $i &lt; $columns; $i++) {
	$out .='&quot;'.$l[&quot;$i&quot;].'&quot;,';
	}
	$out .=&quot;n&quot;;
	}
	// Output to browser with appropriate mime type, you choose <img src='http://www.catswhocode.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />
	header(&quot;Content-type: text/x-csv&quot;);
	//header(&quot;Content-type: text/csv&quot;);
	//header(&quot;Content-type: application/csv&quot;);
	header(&quot;Content-Disposition: attachment; filename=search_results.csv&quot;);
	echo $out;
	exit;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/hjJYx5UwT9w" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/export-mysql-query-results-to-csv/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/export-mysql-query-results-to-csv</feedburner:origLink></item>
	
	<item>
		<title>Multiple backgrounds with CSS3</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/xTxSfiqQVxY/multiple-backgrounds-with-css3</link>
		<comments>http://www.catswhocode.com/blog/snippets/multiple-backgrounds-with-css3#comments</comments>
		<pubDate>Thu, 26 Apr 2012 18:31:41 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4883</guid>

		<description><![CDATA[Multiple backgrounds involved using multiple property assignments with multiple values, separated by a comma.]]></description>
	
		<content:encoded><![CDATA[<pre>#multipleBGs {
	background: url(photo1.png),
	    url(photo2.png),
	    url(photo3.png)
	;
	background-repeat: no-repeat,
	   no-repeat,
	   repeat-y;

	background-position: 0 0,
	    30px 70px,
	    right top;

	width: 400px;
	height: 400px;
	border: 1px solid #ccc;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/xTxSfiqQVxY" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/multiple-backgrounds-with-css3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/multiple-backgrounds-with-css3</feedburner:origLink></item>
	
	<item>
		<title>Show Featured Images In Feed</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/5kuXM0ykfpI/show-featured-images-in-feed</link>
		<comments>http://www.catswhocode.com/blog/snippets/show-featured-images-in-feed#comments</comments>
		<pubDate>Sat, 21 Apr 2012 08:49:55 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4849</guid>

		<description><![CDATA[To encourage subscribers to visit your website, rather than letting them just consume content through your RSS feed, you might want to display only the excerpt and featured image of posts. But WordPress doesn’t display the featured image in the RSS feed by default. Use the following code to do so. You can even add HTML to it.]]></description>
	
		<content:encoded><![CDATA[<pre>add_filter('the_content_feed', 'rss_post_thumbnail');
function rss_post_thumbnail($content) {
	global $post;
	if( has_post_thumbnail($post-&gt;ID) )
		$content = '&lt;p&gt;' . get_the_post_thumbnail($post-&gt;ID, 'thumbnail') . '&lt;/p&gt;' . $content;
	return $content;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/5kuXM0ykfpI" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/show-featured-images-in-feed/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/show-featured-images-in-feed</feedburner:origLink></item>
	
	<item>
		<title>Grab tweets from twitter feed</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/52rOwM3llgg/grab-tweets-from-twitter-feed</link>
		<comments>http://www.catswhocode.com/blog/snippets/grab-tweets-from-twitter-feed#comments</comments>
		<pubDate>Fri, 20 Apr 2012 05:56:38 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4888</guid>

		<description><![CDATA[I use this to quickly grab my tweets and display them on my site. I am not the most mature programmer, for instance this could go into a class. I think this gets the job done quite nicely though. The only downfall is you must have your profile set to public.]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;?php
     try {
          $count = 6;
            $tweet=json_decode(file_get_contents(&quot;http://api.twitter.com/1/statuses/user_timeline/atrueresistance.json?count=&quot;.$count.&quot;&quot; ));
            for ($i=1; $i &lt; $count; $i++){
                //Assign feed to $feed
                $feed = $tweet[($i-1)]-&gt;text;
                //Find location of @ in feed
                $feed = str_pad($feed, 3, ' ', STR_PAD_LEFT);   //pad feed
                $startat = stripos($feed, '@');
                $numat = substr_count($feed, '@');
                $numhash = substr_count($feed, '#');
                $numhttp = substr_count($feed, 'http');
                $feed = preg_replace(&quot;/(http://)(.*?)/([w./&amp;=?-,:;#_~%+]*)/&quot;, &quot;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&quot;, $feed);
                $feed = preg_replace(&quot;(@([a-zA-Z0-9_]+))&quot;, &quot;&lt;a href=&quot;http://www.twitter.com/\1&quot;&gt;&lt;/a&gt;&quot;, $feed);
                $feed = preg_replace('/(^|s)#(w+)/', '1&lt;a href=&quot;http://search.twitter.com/search?q=%232&quot;&gt;#2&lt;/a&gt;', $feed);
                echo &quot;&lt;div class='tweet'&gt;&quot;.$feed.  &quot;&lt;div class='tweet_date'&gt;&quot;. date(&quot;M - j&quot;,strtotime($tweet[($i-1)]-&gt;created_at)).&quot;
                        &lt;/div&gt;&lt;/div&gt;&quot;;
                }
      } catch (Exception $e) {
          echo &quot;Twitter feed is currently down, check back later.&quot;;
      }

?&gt;</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/52rOwM3llgg" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/grab-tweets-from-twitter-feed/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/grab-tweets-from-twitter-feed</feedburner:origLink></item>
	
	<item>
		<title>Test if a plugin is active</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/Tead0U_WTLI/test-if-a-plugin-is-active</link>
		<comments>http://www.catswhocode.com/blog/snippets/test-if-a-plugin-is-active#comments</comments>
		<pubDate>Thu, 19 Apr 2012 05:51:45 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4886</guid>

		<description><![CDATA[Paste the code anywhere on your theme files where you need to test if a specific plugin is active.]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;?php
   if (is_plugin_active('plugin-directory/plugin-file.php')) {
      // the plugin is active
   }
?&gt;</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/Tead0U_WTLI" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/test-if-a-plugin-is-active/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/test-if-a-plugin-is-active</feedburner:origLink></item>
	
	<item>
		<title>Very-Very Simple LetteringJS</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/n8-tifsmN1Q/very-very-simple-letteringjs</link>
		<comments>http://www.catswhocode.com/blog/snippets/very-very-simple-letteringjs#comments</comments>
		<pubDate>Wed, 18 Apr 2012 06:19:44 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4887</guid>

		<description><![CDATA[Just like http://letteringjs.com
This is used to create different style on each letter because each letter has its own class.]]></description>
	
		<content:encoded><![CDATA[<pre>// Wrap all char with span
$('.splitWord').children().andSelf().contents().each(function() {
    if (this.nodeType == 3) {
        $(this).replaceWith(
            $(this).text().replace(/(w)/g, &quot;&lt;span class='char'&gt;$&amp;&lt;/span&gt;&quot;)
        );
    }
});

// Add class .char1, .char2, .char3, ...
$('.splitWord').each(function() {
    $('span.char', this).each(function(i) {
        i = i+1;
        $(this).addClass('char' + i);
    });
});</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/n8-tifsmN1Q" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/very-very-simple-letteringjs/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/very-very-simple-letteringjs</feedburner:origLink></item>
	
	<item>
		<title>Send SMS with PHP and Clickatell HTTP Api</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/y51pgvPjAEw/send-sms-with-php-and-clickatell-http-api</link>
		<comments>http://www.catswhocode.com/blog/snippets/send-sms-with-php-and-clickatell-http-api#comments</comments>
		<pubDate>Wed, 11 Apr 2012 08:01:43 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4880</guid>

		<description><![CDATA[Class example to get your balance, and to send an sms using the Clickatell API. No validation happens on the data you submit. This will need to be handled by you. (Maybe I'll add extra code for that later)]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;?php 

/*
 * EnterSolutions
 * @Author : Morne Oosthuizen (http://www.entersolutions.co.za)
 *
 */ 

class Communications
{ 

    /*
     * Send Sms
     * @param         $aMsgData = array(Number,Message);
     * @return      String
     *
     */
    public function SendSms($aMsgData)
    {
        $result = file_get_contents('http://api.clickatell.com/http/sendmsg?api_id='.CLICKATELL_API.'&amp;user='.CLICKATELL_USERNAME.'&amp;password='.CLICKATELL_PASSWORD.'&amp;to='.$aMsgData['to'].'&amp;text='.substr(urlencode($aMsgData['msg']),0,160));
        return $result;
    } 

    /*
    * Get available credits
    *
    * @return         String
    *
    */
    public function GetBalance()
    {
        $result = file_get_contents('http://api.clickatell.com/http/getbalance?api_id='.CLICKATELL_API.'&amp;user='.CLICKATELL_USERNAME.'&amp;password='.CLICKATELL_PASSWORD);
        return $result;
    } 

}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/y51pgvPjAEw" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/send-sms-with-php-and-clickatell-http-api/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/send-sms-with-php-and-clickatell-http-api</feedburner:origLink></item>
	
	<item>
		<title>Use a classes parents constructor</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/tNY9M2E-n-M/use-a-classes-parents-constructor</link>
		<comments>http://www.catswhocode.com/blog/snippets/use-a-classes-parents-constructor#comments</comments>
		<pubDate>Tue, 10 Apr 2012 17:47:25 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4879</guid>

		<description><![CDATA[var $foo = new foo();
//will echo "run parent constructor" to the screen.]]></description>
	
		<content:encoded><![CDATA[<pre>class foo extends bar {
    public function __construct() {
        parent::__construct();
        // Do constructor stuff here
    }
}

class bar {
    public function __construct() {
        // Do constructor stuff here
        echo &quot;run parent constructor&quot;;
    }
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/tNY9M2E-n-M" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/use-a-classes-parents-constructor/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/use-a-classes-parents-constructor</feedburner:origLink></item>
	
	<item>
		<title>Get text selection</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/hT_JSOQjDQU/get-text-selection</link>
		<comments>http://www.catswhocode.com/blog/snippets/get-text-selection#comments</comments>
		<pubDate>Mon, 09 Apr 2012 07:51:04 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4848</guid>

		<description><![CDATA[Support: IE6, Fx2, Opera9, Safari Cross browser getSelection().]]></description>
	
		<content:encoded><![CDATA[<pre>function getSelection() {
	return (!!document.getSelection) ? document.getSelection() :
	       (!!window.getSelection)   ? window.getSelection() :
	       document.selection.createRange().text;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/hT_JSOQjDQU" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/get-text-selection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/get-text-selection</feedburner:origLink></item>
	
	<item>
		<title>Change “posts” label to “articles”.</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/pF1AdTaRo3M/change-posts-label-to-articles</link>
		<comments>http://www.catswhocode.com/blog/snippets/change-posts-label-to-articles#comments</comments>
		<pubDate>Fri, 06 Apr 2012 05:55:47 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4850</guid>

		<description><![CDATA[Paste in functions.php]]></description>
	
		<content:encoded><![CDATA[<pre>add_filter(  'gettext',  'change_post_to_article'  );
add_filter(  'ngettext',  'change_post_to_article'  );

function change_post_to_article( $translated ) {
     $translated = str_ireplace(  'Post',  'Article',  $translated );  // ireplace is PHP5 only
     return $translated;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/pF1AdTaRo3M" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/change-posts-label-to-articles/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/change-posts-label-to-articles</feedburner:origLink></item>
	
	<item>
		<title>Test whether URL exists</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/H3G_Y_WiFho/test-whether-url-exists</link>
		<comments>http://www.catswhocode.com/blog/snippets/test-whether-url-exists#comments</comments>
		<pubDate>Wed, 04 Apr 2012 13:31:27 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4847</guid>

		<description><![CDATA[Test if an url exists or not.]]></description>
	
		<content:encoded><![CDATA[<pre>function url_exists($url) {
    $hdrs = @get_headers($url);
    return is_array($hdrs) ? preg_match('/^HTTP\/\d+\.\d+\s+2\d\d\s+.*$/',$hdrs[0]) : false;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/H3G_Y_WiFho" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/test-whether-url-exists/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/test-whether-url-exists</feedburner:origLink></item>
	
	<item>
		<title>CSS Only, Zebra Striped PRE Tag</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/BghLFoBUhc0/css-only-zebra-striped-pre-tag</link>
		<comments>http://www.catswhocode.com/blog/snippets/css-only-zebra-striped-pre-tag#comments</comments>
		<pubDate>Thu, 29 Mar 2012 20:12:23 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4841</guid>

		<description><![CDATA[Make a zebra striped effect on the PRE element with pure CSS.]]></description>
	
		<content:encoded><![CDATA[<pre>pre {
  display:block;
  font:normal 12px/22px Monaco,Monospace !important;
  color:#CFDBEC;
  background-color:#2f2f2f;
  background-image:-webkit-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:-moz-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:-ms-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:-o-repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  background-image:repeating-linear-gradient(top, #444 0px, #444 22px, #2f2f2f 22px, #2f2f2f 44px);
  padding:0em 1em;
  overflow:auto;
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/BghLFoBUhc0" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/css-only-zebra-striped-pre-tag/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/css-only-zebra-striped-pre-tag</feedburner:origLink></item>
	
	<item>
		<title>Detecting orientation change on mobile devices</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/IOOIjK6Yc0w/detecting-orientation-change-on-mobile-devices</link>
		<comments>http://www.catswhocode.com/blog/snippets/detecting-orientation-change-on-mobile-devices#comments</comments>
		<pubDate>Wed, 21 Mar 2012 15:09:49 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4833</guid>

		<description><![CDATA[This code will add an action listener to your window. A value of 0 means portrait view, -90 means a the device is landscape rotated to the right, and 90 means the device is landscape rotated to the left.]]></description>
	
		<content:encoded><![CDATA[<pre>window.addEventListener(&quot;orientationchange&quot;, function() {
	// Announce the new orientation number
	alert(window.orientation);
}, false);</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/IOOIjK6Yc0w" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/detecting-orientation-change-on-mobile-devices/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/detecting-orientation-change-on-mobile-devices</feedburner:origLink></item>
	
	<item>
		<title>Get Your Most Recent Twitter Status Using PHP</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/wJzVjIzkVME/get-your-most-recent-twitter-status-using-php</link>
		<comments>http://www.catswhocode.com/blog/snippets/get-your-most-recent-twitter-status-using-php#comments</comments>
		<pubDate>Tue, 20 Mar 2012 15:35:13 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4832</guid>

		<description><![CDATA[To find your numerical Twitter ID, login to Twitter and click on your RSS feed (bottom of the page). The URL will look something like http://twitter.com/statuses/friends_timeline/12345678.rss. Your ID will be the 12345678.]]></description>
	
		<content:encoded><![CDATA[<pre>&lt;?php
function get_status($twitter_id, $hyperlinks = true) {
    $c = curl_init();
    curl_setopt($c, CURLOPT_URL, &quot;http://twitter.com/statuses/user_timeline/$twitter_id.xml?count=1&quot;);
    curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
    $src = curl_exec($c);
    curl_close($c);
    preg_match('/&lt;text&gt;(.*)&lt;/text&gt;/', $src, $m);
    $status = htmlentities($m[1]);
    if( $hyperlinks ) $status = ereg_replace(&quot;[[:alpha:]]+://[^&lt;&gt;[:space:]]+[[:alnum:]/]&quot;, &quot;&lt;a href=&quot;\0&quot;&gt;\0&lt;/a&gt;&quot;, $status);
    return($status);
}
?&gt;</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/wJzVjIzkVME" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/get-your-most-recent-twitter-status-using-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/get-your-most-recent-twitter-status-using-php</feedburner:origLink></item>
	
	<item>
		<title>JQuery fade in/fade out</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/acL-OvsnRns/jquery-fade-infade-out</link>
		<comments>http://www.catswhocode.com/blog/snippets/jquery-fade-infade-out#comments</comments>
		<pubDate>Thu, 15 Mar 2012 18:13:28 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4819</guid>

		<description><![CDATA[fade in/fade out using jQuery.]]></description>
	
		<content:encoded><![CDATA[<pre>q1 = {
	init: function() {
		$(&quot;table.appTranslation&quot;).click(function() {
			$(this).fadeOut('slow', function() {
				$(this).html(&quot;Text to change&quot;).fadeIn('slow');
			});
		});
	}
}
q1.init();

});</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/acL-OvsnRns" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/jquery-fade-infade-out/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/jquery-fade-infade-out</feedburner:origLink></item>
	
	<item>
		<title>Unzip zip files</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/swLSEmc14bw/unzip-zip-files</link>
		<comments>http://www.catswhocode.com/blog/snippets/unzip-zip-files#comments</comments>
		<pubDate>Fri, 09 Mar 2012 12:51:56 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4820</guid>

		<description><![CDATA[usefull PHP function to unzip any zip files.]]></description>
	
		<content:encoded><![CDATA[<pre>function unzip_file($file, $destination){
	// create object
	$zip = new ZipArchive() ;
	// open archive
	if ($zip->open($file) !== TRUE) {
		die (’Could not open archive’);
	}
	// extract contents to destination directory
	$zip->extractTo($destination);
	// close archive
	$zip->close();
	echo 'Archive extracted to directory';
}</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/swLSEmc14bw" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/unzip-zip-files/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/unzip-zip-files</feedburner:origLink></item>
	
	<item>
		<title>CSS Tooltip</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/QIYFdppGOm0/css-tooltip</link>
		<comments>http://www.catswhocode.com/blog/snippets/css-tooltip#comments</comments>
		<pubDate>Fri, 09 Mar 2012 12:42:42 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4782</guid>

		<description><![CDATA[Simple tooltip in full CSS.]]></description>
	
		<content:encoded><![CDATA[<pre>a:hover { background:#ffffff; text-decoration:none;} /*BG color is a must for IE6*/
a.tooltip span {display:none; padding:2px 3px; margin-left:8px; width:130px;}
a.tooltip:hover span{display:inline; position:absolute; background:#ffffff; border:1px solid #cccccc; color:#6c6c6c;}

Easy &lt;a class=&quot;tooltip&quot; href=&quot;#&quot;&gt;Tooltip&lt;span&gt;This is the crazy little Easy Tooltip Text.&lt;/span&gt;&lt;/a&gt;.</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/QIYFdppGOm0" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/css-tooltip/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/css-tooltip</feedburner:origLink></item>
	
	<item>
		<title>Submit Form with Ajax</title>
		<link>http://feedproxy.google.com/~r/catswhocode-snippets/~3/FC9WwLn1QoY/submit-form-with-ajax</link>
		<comments>http://www.catswhocode.com/blog/snippets/submit-form-with-ajax#comments</comments>
		<pubDate>Thu, 08 Mar 2012 06:57:14 +0000</pubDate>
		<dc:creator />
		<guid isPermaLink="false">http://www.catswhocode.com/blog/?post_type=snippets&amp;p=4812</guid>

		<description><![CDATA[Use like $("myElement").submitWithAjax() to add unobtrusive submission via Ajax to your forms.]]></description>
	
		<content:encoded><![CDATA[<pre>jQuery.fn.submitWithAjax = function() {
	this.submit(function() {
		$.post(this.action, $(this).serialize(), null, &quot;script&quot;);
		return false;
	});
	return this;
};</pre>
<img src="http://feeds.feedburner.com/~r/catswhocode-snippets/~4/FC9WwLn1QoY" height="1" width="1"/>]]></content:encoded>
	
		<wfw:commentRss>http://www.catswhocode.com/blog/snippets/submit-form-with-ajax/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>

	<feedburner:origLink>http://www.catswhocode.com/blog/snippets/submit-form-with-ajax</feedburner:origLink></item>
	
</channel>
</rss>

