<?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/" version="2.0">

<channel>
	<title>CatsWhoCode.com</title>
	
	<link>http://www.catswhocode.com/blog</link>
	<description>Web Development Blog</description>
	<lastBuildDate>Mon, 13 May 2013 14:09:59 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Catswhocode" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="catswhocode" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">Catswhocode</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>CSS and JavaScript tools to take your website to the next level</title>
		<link>http://www.catswhocode.com/blog/css-and-javascript-tools-to-take-your-website-to-the-next-level</link>
		<comments>http://www.catswhocode.com/blog/css-and-javascript-tools-to-take-your-website-to-the-next-level#comments</comments>
		<pubDate>Mon, 13 May 2013 14:09:59 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[Web Development Tools]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5508</guid>
		<description><![CDATA[Want to enhance your website with the latest tools available? In this article, I have compiled a bunch of super useful tools to enhance your website and take it to the next level.]]></description>
				<content:encoded><![CDATA[<h2>Topcoat</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/topcoat.png" alt="" /><br />
Topcoat is a very neat and clean library of CSS classes specialized in form elements: buttons, checkboxes, sliders, etc. A super easy way to make your website or app look good in minutes.</p>
<p><strong>Demo/Download: <a href="http://topcoat.io/">http://topcoat.io/</a></strong></p>
<h2>Countable.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/countable.png" alt="" /><br />
As you can guess, countable.js is a JavaScript function to add live paragraph, word and character counting to any HTML element. It is very small and do not rely on any JS framework.</p>
<p><strong>Demo/Download: <a href="http://radlikewhoa.github.io/Countable/">http://radlikewhoa.github.io/Countable/</a></strong></p>
<h2>iCheck</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/icheck.png" alt="" /><br />
Want super-looking checkboxes and radio buttons for your new web app? Then try iCheck, a jQuery plugin which allow you to easily customize radio buttons and checkboxes. iCheck is easy to use and comes with various skins and color schemes.</p>
<p><strong>Demo/Download: <a href="http://damirfoy.com/iCheck/">http://damirfoy.com/iCheck/</a></strong></p>
<h2>CSS only responsive navigation </h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/navigation.png" alt="" /><br />
Responsive layouts are very popular on the web right now, and this is definitely a good thing in my opinion. Here is a downloadable and reusable responsive navigation menu, made in CSS only.</p>
<p><strong>Demo/Download: <a href="http://valdelama.com/css-responsive-navigation">http://valdelama.com/css-responsive-navigation</a></strong></p>
<h2>Almost Flat UI </h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/flat.png" alt="" /><br />
Based on Foundation Framework, Almost Flat UI is a complete HTML/CSS/JS framework to build your site on. It looks really clean and professional. Definitely worth a try!</p>
<p><strong>Demo/Download: <a href="http://websymphony.net/almost-flat-ui/">http://websymphony.net/almost-flat-ui/</a></strong></p>
<h2>Chart.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/chart.png" alt="" /><br />
Chart.js is a dependency free, lightweight and object-oriented tool to create client side graphs. It features 6 different chart types and is very easy to use.</p>
<p><strong>Demo/Download: <a href="http://www.chartjs.org/">http://www.chartjs.org/</a></strong></p>
<h2>PlaceIMG</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/placeimg.png" alt="" /><br />
When building websites or apps, you often need placeholder images. This very handy service generates random images at the requested size. Super useful! </p>
<p><strong>Demo/Download: <a href="http://placeimg.com/">http://placeimg.com/</a></strong></p>
<h2>jQuery PanZoom</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/panzoom.png" alt="" /><br />
jQuery Panzoom is a progressive plugin to create panning and zooming functionality for an element. Panzoom supports the same browsers as jQuery 2.0 and can be used with jQuery 1.9.0+ or jQuery 2.0+.</p>
<p><strong>Demo/Download: <a href="https://github.com/timmywil/jquery.panzoom/">https://github.com/timmywil/jquery.panzoom/</a></strong></p>
<h2>Perfect Scrollbar</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/scrollbar.png" alt="" /><br />
If you want to be able to create perfect looking scrollbars, then you should definitely have a look to this tiny jQuery plugin. It helps you to create customized scrollbars with no css change on any original element.</p>
<p><strong>Demo/Download: <a href="http://noraesae.github.io/perfect-scrollbar/">http://noraesae.github.io/perfect-scrollbar/</a></strong></p>
<h2>FitVids.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/fitvids.png" alt="" /><br />
A lightweight, easy-to-use jQuery plugin for fluid width video embeds. It was built by was built by Chris Coyier and Paravel.</p>
<p><strong>Demo/Download: <a href="http://fitvidsjs.com/">http://fitvidsjs.com/</a></strong></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/gHVXK7U-pZY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/css-and-javascript-tools-to-take-your-website-to-the-next-level/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful snippets to protect your WordPress blog against scrapers</title>
		<link>http://www.catswhocode.com/blog/useful-snippets-to-protect-your-wordpress-blog-against-scrapers</link>
		<comments>http://www.catswhocode.com/blog/useful-snippets-to-protect-your-wordpress-blog-against-scrapers#comments</comments>
		<pubDate>Mon, 22 Apr 2013 14:36:39 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5484</guid>
		<description><![CDATA[If you run a blog, you probably already had to face the problem of content scraping: Some people steal your content to display it on their own blog, usually with lots of Adsense ads. Here are a few useful code snippets to help protect your blog against scrapers.]]></description>
				<content:encoded><![CDATA[<h2>Force your WordPress blog to break out of frames</h2>
<p>Some scrapers display your blog in a frame to keep advantage of your content, and show their ads in another frame in order to try to make a few bucks. This code will force your blog to break out of the frames, so the visitor will only see your blog, not the scraper site.</p>
<p>Just paste the code below into your <code>functions.php</code> file, save it, and you&#8217;re done.</p>
<pre>
// Break Out of Frames for WordPress
function break_out_of_frames() {
	if (!is_preview()) {
		echo &quot;\n&lt;script type=\&quot;text/javascript\&quot;&gt;&quot;;
		echo &quot;\n&lt;!--&quot;;
		echo &quot;\nif (parent.frames.length &gt; 0) { parent.location.href = location.href; }&quot;;
		echo &quot;\n--&gt;&quot;;
		echo &quot;\n&lt;/script&gt;\n\n&quot;;
	}
}
add_action(&#39;wp_head&#39;, &#39;break_out_of_frames&#39;);
</pre>
<p><strong>Source: <a href="http://wp-mix.com/break-out-of-frames-wordpress/">http://wp-mix.com/break-out-of-frames-wordpress/</a></strong></p>
<h2>Protect your blog against image hotlinking</h2>
<p>Most scrapers simply use your RSS feed and display it on their site, which means that they also use your original images on their sites, and consume your server bandwidth for their own websites. So you can definitely use this to inform the reader that he&#8217;s reading an article stolen from another blog.</p>
<p>Let&#8217;s create a small image saying something like &#8220;This article has been stolen from www.yoursite.com&#8221;. and upload it on your blog server. Then, edit your <code>.htaccess</code> file, (located in your WordPress blog root directory) and append this code to it:</p>
<pre>
RewriteEngine On
#Replace ?mysite\.com/ with your blog url
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Replace /images/nohotlink.jpg with your "don't hotlink" image url
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
</pre>
<p>Here is a funny example of this technique in action:</p>
<p style="text-align:center">
<img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/04/hotlinking-fail.jpg" alt="" />
</p>
<p><strong>Source: <a href="http://www.wprecipes.com/how-to-protect-your-wordpress-blog-from-hotlinking">http://www.wprecipes.com/how-to-protect-your-wordpress-blog-from-hotlinking</a></strong></p>
<h2>Automatically add a link to your post title</h2>
<p>As the majority of content thieves are using automatic scraping tools, they&#8217;ll scrap all of your content, including the post title. A good way to discourage scrapers is to automatically put a link on your post titles, so each stolen post will automatically link to your original post.</p>
<p>To do so in WordPress, simply open your <code>single.php</code> file and locate where the title is displayed. Then, replace the code by the following:</p>
<pre>
&lt;h1&gt;
  &lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;
&lt;/h1&gt;
</pre>
<p><strong>Source: <a href="http://www.catswhoblog.com/how-to-protect-your-blog-from-content-thieves">http://www.catswhoblog.com/how-to-protect-your-blog-from-content-thieves</a></strong></p>
<h2>Automatically add a link to your original posts using RSS feed</h2>
<p>Another useful way to fight back against content theft is to automatically insert a copyright notice with a backlink to the original post on each RSS item. That way, scrapers who use your RSS feed to publish your content on their own sites automatically will also publish your copyright notice and backlink!</p>
<p>Simply add the code below to your <code>functions.php</code> file. Copyright notice can be customized on line 4.</p>
<pre>
// add custom feed content
function add_feed_content($content) {
	if(is_feed()) {
		$content .= &#39;&lt;p&gt;This article is copyright &amp;copy; &#39;.date(&#39;Y&#39;).&#39;&amp;nbsp;&#39;.bloginfo(&#39;name&#39;).&#39;&lt;/p&gt;&#39;;
	}
	return $content;
}
add_filter(&#39;the_excerpt_rss&#39;, &#39;add_feed_content&#39;);
add_filter(&#39;the_content&#39;, &#39;add_feed_content&#39;);
</pre>
<p><strong>Source: <a href="http://digwp.com/2012/10/customizing-wordpress-feeds/">http://digwp.com/2012/10/customizing-wordpress-feeds/</a></strong></p>
<h2>Create a custom RSS feed</h2>
<p>While the technique above is good, it only display a small notice at the bottom of your posts. You might want a more in-depth solution, which allow you to limit the number of characters appearing in each RSS feed item.</p>
<p>Here is a ready to use WordPress page template that you can easily customize to fit your specific needs. </p>
<pre>
&lt;?php
/*
Template Name: Custom Feed
*/

$numposts = 5;

function yoast_rss_date( $timestamp = null ) {
  $timestamp = ($timestamp==null) ? time() : $timestamp;
  echo date(DATE_RSS, $timestamp);
}

function yoast_rss_text_limit($string, $length, $replacer = &#39;...&#39;) { 
  $string = strip_tags($string);
  if(strlen($string) &gt; $length) 
    return (preg_match(&#39;/^(.*)\W.*$/&#39;, substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer;   
  return $string; 
}

$posts = query_posts(&#39;showposts=&#39;.$numposts);

$lastpost = $numposts - 1;

header(&quot;Content-Type: application/rss+xml; charset=UTF-8&quot;);
echo &#39;&lt;?xml version=&quot;1.0&quot;?&gt;&#39;;
?&gt;&lt;rss version=&quot;2.0&quot;&gt;
&lt;channel&gt;
  &lt;title&gt;Yoast E-mail Update&lt;/title&gt;
  &lt;link&gt;http://yoast.com/&lt;/link&gt;
  &lt;description&gt;The latest blog posts from Yoast.com.&lt;/description&gt;
  &lt;language&gt;en-us&lt;/language&gt;
  &lt;pubDate&gt;&lt;?php yoast_rss_date( strtotime($ps[$lastpost]-&gt;post_date_gmt) ); ?&gt;&lt;/pubDate&gt;
  &lt;lastBuildDate&gt;&lt;?php yoast_rss_date( strtotime($ps[$lastpost]-&gt;post_date_gmt) ); ?&gt;&lt;/lastBuildDate&gt;
  &lt;managingEditor&gt;joost@yoast.com&lt;/managingEditor&gt;
&lt;?php foreach ($posts as $post) { ?&gt;
  &lt;item&gt;
    &lt;title&gt;&lt;?php echo get_the_title($post-&gt;ID); ?&gt;&lt;/title&gt;
    &lt;link&gt;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&lt;/link&gt;
    &lt;description&gt;&lt;?php echo &#39;&lt;![CDATA[&#39;.yoast_rss_text_limit($post-&gt;post_content, 500).&#39;&lt;br/&gt;&lt;br/&gt;Keep on reading: &lt;a href=&quot;&#39;.get_permalink($post-&gt;ID).&#39;&quot;&gt;&#39;.get_the_title($post-&gt;ID).&#39;&lt;/a&gt;&#39;.&#39;]]&gt;&#39;;  ?&gt;&lt;/description&gt;
    &lt;pubDate&gt;&lt;?php yoast_rss_date( strtotime($post-&gt;post_date_gmt) ); ?&gt;&lt;/pubDate&gt;
    &lt;guid&gt;&lt;?php echo get_permalink($post-&gt;ID); ?&gt;&lt;/guid&gt;
  &lt;/item&gt;
&lt;?php } ?&gt;
&lt;/channel&gt;
&lt;/rss&gt;
</pre>
<p><strong>Source: <a href="http://yoast.com/custom-rss-feeds-wordpress/">http://yoast.com/custom-rss-feeds-wordpress/</a></strong></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/5HuJFbecGQY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/useful-snippets-to-protect-your-wordpress-blog-against-scrapers/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Hacks and snippets to enhance WordPress search engine</title>
		<link>http://www.catswhocode.com/blog/hacks-and-snippets-to-enhance-wordpress-search-engine</link>
		<comments>http://www.catswhocode.com/blog/hacks-and-snippets-to-enhance-wordpress-search-engine#comments</comments>
		<pubDate>Mon, 08 Apr 2013 14:23:59 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5470</guid>
		<description><![CDATA[WordPress built-in search engine is often cited as one of the weak points of the popular blogging platform. In this article, I have compiled several code snippets to make WordPress search engine a lot better.]]></description>
				<content:encoded><![CDATA[<h2>Redirect to first post if only one post is found</h2>
<p>Let&#8217;s start with a handy snippet that will automatically redirect the reader to the post if only one post is found. Simply paste it in your <code>functions.php</code> file and you&#8217;re done. </p>
<pre>
add_action(&#39;template_redirect&#39;, &#39;redirect_single_post&#39;);
function redirect_single_post() {
    if (is_search()) {
        global $wp_query;
        if ($wp_query-&gt;post_count == 1) {
            wp_redirect( get_permalink( $wp_query-&gt;posts[&#39;0&#39;]-&gt;ID ) );
        }
    }
}
</pre>
<p><strong>Source: <a href="http://www.paulund.co.uk/redirect-search-results-return-one-post">http://www.paulund.co.uk/redirect-search-results&#8230;</a></strong></p>
<h2>Display the number of results in WordPress search</h2>
<p>When a search is done on your blog, WordPress does not return the number of results found. Though, this can be useful for the person who made the search.</p>
<p>In order to display the number of results, open your <code>search.php</code> file. In it, search for the following:</p>
<pre>
&lt;h2 class="pagetitle">Search Results&lt;/h2>
</pre>
<p>Now replace it with:</p>
<pre>
&lt;h2 class="pagetitle">Search Results for &lt;?php 
/* Search Count */ 
$allsearch = &#038;new WP_Query("s=$s&#038;showposts=-1"); 
$key = wp_specialchars($s, 1); 
$count = $allsearch-&gt;post_count; _e(''); 
_e('&lt;span class="search-terms"&gt;'); 
echo $key; _e('&lt;/span&gt;'); _e(' &mdash; '); 
echo $count . ' '; _e('articles'); 

wp_reset_query(); ?&gt;&lt;/h2>
</pre>
<p><strong>Source: <a href="http://www.problogdesign.com/wordpress/3-codes-for-a-far-better-wordpress-search-page/">http://www.problogdesign.com/wordpress/3-codes-for-a-far-better&#8230;</a></strong></p>
<h2>Enlight searched text in search results</h2>
<p>Here is an easy way to make your search results more user-friendly: Enlight searched text.<br />
To do so, open your <code>search.php</code> file and find the <code>the_title()</code> function. Replace it with:</p>
<pre>echo $title;</pre>
<p>Now, just before the line you just modified, add this code:</p>
<pre>&lt;?php
	$title 	= get_the_title();
	$keys= explode(" ",$s);
	$title 	= preg_replace('/('.implode('|', $keys) .')/iu',
		'&lt;strong class="search-excerpt"&gt;\0&lt;/strong&gt;',
		$title);
?&gt;</pre>
<p>Save the <code>search.php</code> file and open <code>style.css</code>. Append the following line to it:</p>
<pre>
strong.search-excerpt { background: yellow; }
</pre>
<p>That&#8217;s all. Better, isn&#8217;t it?</p>
<p><strong>Source: <a href="http://yoast.com/wordpress-search/">http://yoast.com/wordpress-search/</a></strong></p>
<h2>Limit posts per page on search</h2>
<p>By default, WordPress outputs 10 posts per page on the search results page. If you need to change this number, just paste the following code in your <code>functions.php</code> file. Replace the number on line 3 by the desired number of posts to be displayed.</p>
<pre>
function limit_posts_per_search_page() {
	if ( is_search() )
		set_query_var(&#39;posts_per_archive_page&#39;, 20); 
}

add_filter(&#39;pre_get_posts&#39;, &#39;limit_posts_per_search_page&#39;);
</pre>
<p><strong>Source: <a href="http://wordpress.org/support/topic/limit-post-per-search-page">http://wordpress.org/support/topic/limit-post-per-search-page</a></strong></p>
<h2>Search within post type only</h2>
<p>If you want to force the search engine to search only within a specific post type, here is the solution. Paste the code below into your <code>functions.php</code> file after you changed the post type name on line 4.</p>
<pre>
function SearchFilter($query) {
  if ($query-&gt;is_search) {
    // Insert the specific post type you want to search
    $query-&gt;set(&#39;post_type&#39;, &#39;feeds&#39;);
  }
  return $query;
}
 
// This filter will jump into the loop and arrange our results before they&#39;re returned
add_filter(&#39;pre_get_posts&#39;,&#39;SearchFilter&#39;);
</pre>
<p><strong>Source: <a href="http://www.hongkiat.com/blog/wordpress-search-plugin-snippet/">http://www.hongkiat.com/blog/wordpress-search-plugin-snippet/</a></strong></p>
<h2>Limit search to specific categories</h2>
<p>Is it also possible to limit search to specific categories. To do so, just replace the categories IDs on line 3 and paste the following code on your <code>search.php</code> template:</p>
<pre>
&lt;?php if( is_search() )  :
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("s=$s&#038;paged=$paged&#038;cat=1,2,3");
endif; ?&gt;
</pre>
<p><strong>Source: <a href="http://www.wprecipes.com/how-to-limit-search-to-specific-categories">http://www.wprecipes.com/how-to-limit-search-to-specific-categories</a></strong></p>
<h2>Completely shut down WordPress search</h2>
<p>Although search is a really useful feature on most websites, sometimes you simply don&#8217;t need it at all. Did you knew that you could completely shut down WordPress search? Just include the function below in your <code>functions.php</code> file.</p>
<pre>
function fb_filter_query( $query, $error = true ) {
    if ( is_search() ) {
        $query-&gt;is_search = false;
        $query-&gt;query_vars[s] = false;
        $query-&gt;query[s] = false;
 
        // to error
        if ( $error == true )
            $query-&gt;is_404 = true;
    }
}
 
add_action( &#39;parse_query&#39;, &#39;fb_filter_query&#39; );
add_filter( &#39;get_search_form&#39;, create_function( &#39;$a&#39;, &quot;return null;&quot; ) );
</pre>
<p><strong>Source: <a href="http://wpengineer.com/1042/disable-wordpress-search/">http://wpengineer.com/1042/disable-wordpress-search/</a></strong></p>
<h2>Make your search results unlimited</h2>
<p>As I already stated before, the fact that WordPress displays 10 posts by default on the search results page can be annoying. If you&#8217;d like to display unlimited search results on the same page, here&#8217;s an easy way to do it.</p>
<p>In <code>search.php</code>, find the code below:</p>
<pre>
&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;
</pre>
<p>Once you found it, replace it by this:</p>
<pre>
&lt;?php $posts=query_posts($query_string . &#39;&amp;posts_per_page=-1&#39;); ?&gt;
&lt;?php if (have_posts()) : ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;
</pre>
<p>That&#8217;s all. You&#8217;re done!<br />
<strong>Source: <a href="http://wphacks.com/how-to-make-wordpress-search-results-unlimited/">http://wphacks.com/how-to-make-wordpress-search-results-unlimited/</a></strong></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/jRafimgm00I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/hacks-and-snippets-to-enhance-wordpress-search-engine/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Cross browser compatible HTML5 videos</title>
		<link>http://www.catswhocode.com/blog/cross-browser-compatible-html5-videos</link>
		<comments>http://www.catswhocode.com/blog/cross-browser-compatible-html5-videos#comments</comments>
		<pubDate>Tue, 02 Apr 2013 14:48:56 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5453</guid>
		<description><![CDATA[For years, Flash has been the most popular solution for playing videos on the web. But the HTML5 specification is bringing a new solution, HTML5 videos. In this tutorial, I'll show you how to use HTML5 to display videos on your website.]]></description>
				<content:encoded><![CDATA[<h2>Step 1: Preparing files</h2>
<p>The first thing to do is to make sure your files are in the right format for HTML5 video playing. Right now, there&#8217;s no standard format so you&#8217;ll have to have multiple versions of the same file in order to serve the right format to the client browser. This is indeed the biggest problem with HTML5 videos right now.</p>
<p>You&#8217;ll need the 3 following formats: The first is <code>.mp4</code> (or .<code>m4v</code>) which is used on Apple products such as iPads, Safari, etc. The second format needed is <code>.ogv</code>, an open-source format used by Firefox. And the last one is <code>.webm</code>.</p>
<p>Converting your file into those formats is pretty easy if you use this very handy tool named <a href="http://video.online-convert.com/">Video Converter</a>. You have nothing to install on your computer, simply upload your video, choose the desired output format, and you&#8217;re done!</p>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/online-convert.png" alt="" /></p>
<p>Now that you have your video in the required formats, let&#8217;s start coding. You&#8217;ll see, it&#8217;s very easy.</p>
<h2>Step 2: Coding the player</h2>
<p>Below is the basic code for displaying a HTML5 video on a web page. Please note that in order to have the video properly displayed on iPad, you must start with the <code>.mp4</code> video in the src list.</p>
<p>On line 5, I have added a download link for older browser who don&#8217;t recognize the <code>&lt;video&gt;</code> tag.</p>
<pre>
&lt;video width=&quot;800&quot; height=&quot;374&quot;&gt;
	&lt;source src=&quot;my_video.mp4&quot; type=&quot;video/mp4&quot; /&gt;
	&lt;source src=&quot;my_video.ogv&quot; type=&quot;video/ogg&quot; /&gt;
	&lt;source src=&quot;my_video.webm&quot; type=&quot;video/webm&quot; /&gt;
	Video tag not supported. Download the video &lt;a href="video.webm"&#038;gthere&lt;/a&#038;gt.
&lt;/video&gt;
</pre>
<p>A very important thing to remember is to make sure your server is serving video files with the correct MIME type in the <code>Content-Type</code> header. To make sure it will, open your site .htaccess file (don&#8217;t forget to do a backup before any modification) and add the lines below:</p>
<pre>
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
</pre>
<p>Also, various attributes can be used with the <code>&lt;video&gt;</code> element, for example to autoplay the video, loop it, or automatically display some controls. For the full reference, please see the <a href="http://www.w3.org/wiki/HTML/Elements/video">w3 site</a>. </p>
<h2>Step 3: Creating a fallback for older browsers</h2>
<p>Now, you have a super cool HTML5 video player. But the problem is that some older browsers don&#8217;t support any HTML video at all. For those browsers, the only solution is to use a Flash fallback.</p>
<p>As the purpose of this tutorial is not to show how to built a Flash video player, I&#8217;m assuming that you have your video in the <code>.flv</code> format (named <em>video.flv</em> below) as well as a flash <code>.flv</code> player (named <em>fallback.swf</em>).</p>
<p>As you can see below, I have added my <code>&lt;object&gt;</code> tag inside the <code>&lt;video&gt;</code> tag. That&#8217;s simple as that! </p>
<pre>
&lt;video width=&quot;800&quot; height=&quot;374&quot;&gt;
	&lt;source src=&quot;my_video.mp4&quot; type=&quot;video/mp4&quot; /&gt;
	&lt;source src=&quot;my_video.ogv&quot; type=&quot;video/ogg&quot; /&gt;

	&lt;object width=&quot;800&quot; height=&quot;374&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;fallback.swf&quot;&gt;
		&lt;param name=&quot;movie&quot; value=&quot;fallback.swf&quot; /&gt;
		&lt;param name=&quot;flashvars&quot; value=&quot;autostart=true&amp;amp;file=video.flv&quot; /&gt;
	&lt;/object&gt;

&lt;/video&gt; 
</pre>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/EhvkLe8Y3Ow" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/cross-browser-compatible-html5-videos/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Super useful jQuery plugins for responsive web design</title>
		<link>http://www.catswhocode.com/blog/super-useful-jquery-plugins-for-responsive-web-design</link>
		<comments>http://www.catswhocode.com/blog/super-useful-jquery-plugins-for-responsive-web-design#comments</comments>
		<pubDate>Tue, 26 Mar 2013 15:16:02 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5436</guid>
		<description><![CDATA[When building responsive websites, jQuery can be very helpful. In today's article, I have compiled a list of jQuery plugins that will definitely help you building more responsive and usable websites.]]></description>
				<content:encoded><![CDATA[<h2>SlabText.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2012/08/slabtext.png" alt="" /><br />
SlabText is a jQuery plugin that splits headlines into rows before resizing each row to fill the available horizontal space. Basically, it means that your headline will always look great whatever of the client screen size.<br />
<strong>Download: <a href="http://www.frequency-decoder.com/2012/01/08/slabtext-a-jquery-plugin-for-producing-big-bold-responsive-headlines">http://www.frequency-decoder.com/2012/01/08/slabtext-a-jquery-plugin&#8230;</a></strong></p>
<h2>jQuery Masonry</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/masonry.png" alt="" /><br />
Masonry is a dynamic grid layout plugin for jQuery. Think of it as the flip-side of CSS floats. Whereas floating arranges elements horizontally then vertically, Masonry arranges elements vertically, positioning each element in the next open spot in the grid.<br />
<strong>Download: <a href="http://masonry.desandro.com/">http://masonry.desandro.com/</a></strong></p>
<h2>TinyNav.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/tinynav.png" alt="" /><br />
TinyNav.js is a super useful jQuery plugin which allows you to automatically turn a navigation menu into a <code>select</code> for small devices such as iPhones. A must have!<br />
<strong>Download: <a href="http://tinynav.viljamis.com/">http://tinynav.viljamis.com/</a></strong></p>
<h2>FitText.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2011/06/fittext.png" alt="" /><br />
FitText is a simple jQuery plugin that automatically make a text fit the width of its parent element. Perfect for awesome, responsive headlines!<br />
<strong>Download: <a href="http://fittextjs.com/">http://fittextjs.com/</a></strong></p>
<h2>Breakpoints.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/breakpoints.png" alt="" /><br />
Simply define breakpoints for your responsive design, and Breakpoints.js will fire custom events when the browser enters and/or exits that breakpoint. Very useful on complicated layouts!<br />
<strong>Download: <a href="http://xoxco.com/projects/code/breakpoints/">http://xoxco.com/projects/code/breakpoints/</a></strong></p>
<h2>ResponsiveSlides.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/slides.png" alt="" /><br />
Slideshows are very popular among the web. Though, forcing them to fit any screen size can be a little tricky. ResponsiveSlides.js allow you to create responsive slideshows, which will look great whatever on any device.<br />
<strong>Download: <a href="http://responsive-slides.viljamis.com/">http://responsive-slides.viljamis.com/</a></strong></p>
<h2>Flare</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/flare.png" alt="" /><br />
Flare is another jQuery plugin for building responsive and full width slideshows. It is not free but it is absolutely worth $10 as it is very easy to use and visually pleasant.<br />
<strong>Download: <a href="http://is.gd/flarecwc">http://is.gd/flarecwc</a></strong></p>
<h2>FitVids.js</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/fitvids.png" alt="" /><br />
A lightweight, easy-to-use jQuery plugin for fluid width video embeds. It was built by was built by Chris Coyier and Paravel.<br />
<strong>Download: <a href="http://fitvidsjs.com/">http://fitvidsjs.com/</a></strong></p>
<h2>Responsive tables</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/responsive-tables.png" alt="" /><br />
Does your tables break your responsive layout? If yes, here is a simple JS/CSS combo that will let your tables adapt to small device screens without everything going to hell. A must have for any tables!<br />
<strong>Download: <a href="http://www.zurb.com/playground/responsive-tables">http://www.zurb.com/playground/responsive-tables</a></strong></p>
<h2>jq-idealforms</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/idealforms.png" alt="" /><br />
Ideal Forms is the ultimate framework for building and validating responsive HTML5 forms. It is super easy to use.<br />
<strong>Download: <a href="http://elclanrs.github.com/jq-idealforms/">http://elclanrs.github.com/jq-idealforms/</a></strong></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/JW4jpx_oVWQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/super-useful-jquery-plugins-for-responsive-web-design/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Ultimate list of WordPress resources</title>
		<link>http://www.catswhocode.com/blog/ultimate-list-of-wordpress-resources</link>
		<comments>http://www.catswhocode.com/blog/ultimate-list-of-wordpress-resources#comments</comments>
		<pubDate>Mon, 11 Mar 2013 15:15:46 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5397</guid>
		<description><![CDATA[WordPress is my favorite tool for building blogs and websites. In this article, I have compiled the most useful resources for WordPress developers I came across in the past 3 years.]]></description>
				<content:encoded><![CDATA[<h2>Starter kits, blank files and generators</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/underscores.png" alt="" /><br />
When developing a WordPress theme, widget or plugin, the best way to start is by using a &#8220;blank&#8221; template file so you&#8217;ll save time and you&#8217;ll start on solid foundations. Here are my favorites:</p>
<ul>
<li><a href="http://www.underscores.me">Underscores.me</a>: in my humble opinion, the best way to start coding a new WordPress theme. Simply fill the options and you&#8217;ll get offered to download a rock solid blank WordPress theme template.</li>
<li><a href="https://github.com/ajaypatelaj/WordPress-Widget-Starter">WP Widget Starter file</a>: a blank template for developing WordPress widgets.</li>
<li><a href="http://pluginstarter.com">Plugin Starter</a>: a base class that is easily extended to make plugin development better, faster and stronger.</li>
<li><a href="https://github.com/aut0poietic/wp-starter-kit">WP Starter Kit</a>: a development template for rapidly building WordPress plugins.</li>
<li><a href="http://cdharrison.com/2008/12/03/threaded-comments">Threaded comments</a>: Basic CSS styles for threaded comments. Always a good start when it comes to styling comments!</li>
</ul>
<h2>WordPress Hosting</h2>
<p><a href="http://is.gd/wpwebhostcwc"><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/wpwebhost.png" alt="" /></a><br />
Basically, it is pretty easy to find a suitable webhost to host a WordPress site or blog. Though, I do recommend the following hosts for the good results I had with them since years:</p>
<ul>
<li><a href="http://is.gd/vidahostcwc">Vidahost</a>: CatsWhoCode webhost. Super fast, reliable, no down time and a super friendly and reactive support. It&#8217;s not cheap at all, but definitely the best option if your site is receiving a lot of traffic, or if you&#8217;re looking to host multiple sites on a single server.</li>
<li><a href="http://is.gd/wpwebhostcwc">WP Web Host</a>: The webhost I recommend for people looking for an affordable and easy way to host a WordPress based website or blog. Friendly support with strong WordPress knowledge. Good service for small/medium sites.</li>
</ul>
<p>On the other hand, I do not recommend Maven Hosting and PHPNet as I had bad results with both of them. I never hosted any of my websites on Bluehost, but I worked with a client who did and I didn&#8217;t found the performances good.</p>
<h2>Free themes</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/themelab.png" alt="" /><br />
There&#8217;s literally thousands of WordPress themes that you can download and use freely on your blog. But let me be honest, most of them are ugly. Though, you can still find great theme that you can use for free. My personal list of favorite places to get quality free themes:</p>
<ul>
<li><a href="http://wordpress.org/extend/themes/">WordPress.org Themes</a>: The official repository for WordPress themes. Most are old and/or ugly, but there&#8217;s lots of beautiful, well coded free themes.</li>
<li><a href="http://wp.smashingmagazine.com/tag/themes/">Smashing Magazine</a>: The popular design blog offers very cool free themes from time to time.</li>
<li><a href="http://www.blogohblog.com/category/wordpress-themes">Blog Oh Blog Themes</a>: Quality themes, clean code.</li>
<li><a href="http://www.themelab.com/free-wordpress-themes/">ThemeLab</a>: Lots of beautiful free themes.</li>
<li><a href="http://www.skinpress.com/">SkinPress</a>: A few cool themes to download and use freely.</li>
</ul>
<p>Want even more free themes? 1st Web Designer compiled <a href="http://www.1stwebdesigner.com/wordpress/sites-find-free-wordpress-themes-daily/">this list</a> of 20 places to get free themes.</p>
<p>Also, note that several premium theme sellers distribute free themes from time to time. Please check out the list below for more info.</p>
<h2>Premium themes</h2>
<p><a href="http://is.gd/themeforestcwc"><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/themeforest.png" alt="" /></a><br />
Although you can find good looking themes for free, lots of quality themes requires you to pay for it. A big pro of premium themes is that authors offer support, so you&#8217;ll have someone to help if needed.</p>
<ul>
<li><a href="http://is.gd/themeforestcwc">Themeforest</a>: Probably my favorite place to get quality themes for a cheap price. Hundreds of themes to choose from. Most themes have a clean code; however code quality may vary from a theme to another.</li>
<li><a href="http://is.gd/woothemescwc">WooThemes</a>: very popular premium theme seller. High quality design and code.</li>
<li><a href="http://is.gd/wpzoom">WP Zoom</a>: High quality design, solid code, great support. Provide some free themes as well.</li>
<li><a href="http://is.gd/elegantthemescwc">Elegant Themes</a>: Beautiful themes, well coded. Pay once and get access to more than 80 themes.</li>
<li><a href="http://is.gd/themify">Themify</a>: Affordable themes with great design and quality.</li>
</ul>
<h2>Tutorials sites and blogs</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/digwp.png" alt="" /><br />
When developing WordPress themes or plugins, you often need to refer to quality tutorials in order to learn new things or consolidate your knowledge. Below is my personal selection of interesting tutorial sites and blogs.</p>
<ul>
<li><a href="http://wp.tutsplus.com/">WP Tuts+</a>: New articles almost everyday, always interesting.</li>
<li><a href="http://wp.smashingmagazine.com/">Smashing Magazine</a>: The popular design blog have some very in-depth tutorials and articles about WP.</li>
<li><a href="http://digwp.com">Digging into WordPress</a>: One of my favorites WordPress tutorials blog. Authored by Jeff Starr and Chris Coyier.</li>
<li><a href="http://wpengineer.com/">WP Engineer</a>: Lots of coding tutorials, tip and tricks. A must read for WordPress enthusiasts.</li>
<li><a href="http://wpmu.org/">WPMU</a>: A multi-author site, with lots of new content every week.</li>
</ul>
<p>I guess most of you know that here at CatsWhoCode, I often write lots of useful posts about WordPress, so don&#8217;t forget to bookmark the site if you haven&#8217;t done already!</p>
<h2>Code snippets</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/wpsnippets.png" alt="" /><br />
Several websites and blogs are offering ready to use WordPress code snippets. Super useful when you need to achieve a particular task.</p>
<ul>
<li><a href="http://www.wprecipes.com/">WPRecipes</a>: Another site of mine, online since 2008, with over 450 WordPress code snippets, hacks and tricks.</li>
<li><a href="http://css-tricks.com/snippets/wordpress/">CSS-Tricks snippets</a>: Quality code snippets repository.</li>
<li><a href="http://www.wpmayor.com/">WP Mayor</a>: Several interesting code snippets.</li>
<li><a href="http://wp-snippets.com/">WP Snippets</a>: One of my favorite online place when I&#8217;m looking for a hack or snippet.</li>
<li><a href="http://snipplr.com/all/tags/wordpress/">Snipplr</a>: Lots of user-submitted code snippets.</li>
</ul>
<h2>WordPress News</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/03/wpcandy.png" alt="" /></p>
<ul>
<li><a href="http://wordpress.org/news/">WordPress.org News</a>: Indeed, the first place to have a look at when looking for WordPress news is the official site.</li>
<li><a href="http://wpcandy.com/">WP Candy</a>: Popular WordPress site with tons of fresh news.</li>
<li><a href="http://weblogtoolscollection.com/">Weblog Tolls Collection</a>: One of the oldest blogs about WordPress.</li>
<li><a href="http://www.wptopics.com/">WPTopics</a>: A news site which aggregate news from lots of interesting blogs.</li>
</ul>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/GU0PpOhjses" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/ultimate-list-of-wordpress-resources/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>HTML5 code snippets to take your website to the next level</title>
		<link>http://www.catswhocode.com/blog/html5-code-snippets-to-take-your-website-to-the-next-level</link>
		<comments>http://www.catswhocode.com/blog/html5-code-snippets-to-take-your-website-to-the-next-level#comments</comments>
		<pubDate>Mon, 04 Mar 2013 15:14:05 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5376</guid>
		<description><![CDATA[HTML5 is the newest revision, and by far the most interesting, of the Hyper Text Markup Language. is In this article I have compiled awesome HTML5 code snippets to take your website to the next level.]]></description>
				<content:encoded><![CDATA[<h2>Url and email input types</h2>
<p>HTML5 introduced new input types <code>url</code> and <code>email</code> are one of those. They allow you to write a more semantically correct code and make the form completion easier on mobile devices, by displaying special buttons (like the @ or .com buttons) depending on the input type.</p>
<p>Here is the <code>url</code> attribute in action:</p>
<pre>&lt;input type=&quot;url&quot; value=&quot;&quot;&gt;</pre>
<p>And the <code>email</code> attribute as well. Please also pay attention to the <code>pattern</code> attribute as I will explain it below. </p>
<pre>&lt;input type=&quot;email&quot; pattern=&quot;[^ @]*@[^ @]*&quot; value=&quot;&quot;&gt;</pre>
<p><strong>Source: <a href="http://davidwalsh.name/html5-email">http://davidwalsh.name/html5-email</a></strong></p>
<h2>Regexp patterns for form validation</h2>
<p>Before HTML5, when you used a form on your website, you had to use JavaScript to create a front-side validation. Now with HTML5 and the <code>pattern</code> attribute, you can define a regular expression pattern to validate the data.</p>
<p>The following snippet is for validating email addresses:</p>
<pre>&lt;input type=&quot;text&quot; title=&quot;email&quot; required pattern=&quot;[^@]+@[^@]+\.[a-zA-Z]{2,6}&quot; /&gt;</pre>
<p>This one is for strong passwords:</p>
<pre>&lt;input title=&quot;at least eight symbols containing at least one number, one lower, and one upper letter&quot; type=&quot;text&quot; pattern=&quot;(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}&quot; required /&gt;</pre>
<p>And this one is for validating phone numbers:</p>
<pre>&lt;input type=&quot;text&quot; required pattern=&quot;(\+?\d[- .]*){7,13}&quot; title=&quot;international, national or local phone number&quot;/&gt;</pre>
<p><strong>Source: <a href="http://blog.staffannoteberg.com/2012/03/01/html5-form-validation-with-regex/">http://blog.staffannoteberg.com/2012/03/01/html5-form-validation-with-regex/</a></strong></p>
<h2>Context menus with HTML5</h2>
<p>HTML5 context menus allows you to add elements to the contextual menu which appears when the user right click somewhere on your page.<br />
At the time of writing this article, the <code>contextmenu</code> element is only compatible with Firefox, so let&#8217;s hope other browsers will implement it very soon. </p>
<pre>
&lt;section contextmenu=&quot;mymenu&quot;&gt; 
&lt;p&gt;Yes, this section right here&lt;/p&gt;
&lt;/section&gt;

&lt;menu type=&quot;context&quot; id=&quot;mymenu&quot;&gt;
  &lt;menuitem label=&quot;Please do not steal our images&quot; icon=&quot;img/forbidden.png&quot;&gt;&lt;/menuitem&gt;
  &lt;menu label=&quot;Social Networks&quot;&gt;
  &lt;menuitem label=&quot;Share on Facebook&quot; onclick=&quot;window.location.href = &#39;http://facebook.com/sharer/sharer.php?u=&#39; + window.location.href;&quot;&gt;   &lt;/menuitem&gt;
  &lt;/menu&gt;
&lt;/menu&gt;
</pre>
<p><strong>Source/Demo: <a href="http://speckyboy.com/2013/02/13/quick-tip-the-html5-context-menu-attribute-2/">http://speckyboy.com/2013/02/13/quick-tip-the-html5&#8230;</a></strong></p>
<h2>HTML5 video, with Flash fallback</h2>
<p>One of the greatest new possibilities of HTML5 is definitely its ability to play video files without requesting the use of Flash. Though, as older browsers are not compatible with HTML5 videos, you should implement a Flash fallback. The following example show how to embed <code>mp4</code> and <code>ogv</code> videos in HTML5, with a Flash fallback for older browsers.</p>
<pre>
&lt;video width=&quot;640&quot; height=&quot;360&quot; controls&gt;
	&lt;source src=&quot;__VIDEO__.MP4&quot;  type=&quot;video/mp4&quot; /&gt;
	&lt;source src=&quot;__VIDEO__.OGV&quot;  type=&quot;video/ogg&quot; /&gt;
	&lt;object width=&quot;640&quot; height=&quot;360&quot; type=&quot;application/x-shockwave-flash&quot; data=&quot;__FLASH__.SWF&quot;&gt;
		&lt;param name=&quot;movie&quot; value=&quot;__FLASH__.SWF&quot; /&gt;
		&lt;param name=&quot;flashvars&quot; value=&quot;controlbar=over&amp;amp;image=__POSTER__.JPG&amp;amp;file=__VIDEO__.MP4&quot; /&gt;
		&lt;img src=&quot;__VIDEO__.JPG&quot; width=&quot;640&quot; height=&quot;360&quot; alt=&quot;__TITLE__&quot;
		     title=&quot;No video playback capabilities, please download the video below&quot; /&gt;
	&lt;/object&gt;
&lt;/video&gt;
</pre>
<p><strong>Source: <a href="http://camendesign.com/code/video_for_everybody">http://camendesign.com/code/video_for_everybody</a></strong></p>
<h2>Autocompletion with HTML5 datalists</h2>
<p>Using the <code>datalist</code> element, HTML5 allows you to create a list of data to autocomplete an input field. Super useful!</p>
<pre>
&lt;input name=&quot;frameworks&quot; list=&quot;frameworks&quot; /&gt;

&lt;datalist id=&quot;frameworks&quot;&gt;
	&lt;option value=&quot;MooTools&quot;&gt;
	&lt;option value=&quot;Moobile&quot;&gt;
	&lt;option value=&quot;Dojo Toolkit&quot;&gt;
	&lt;option value=&quot;jQuery&quot;&gt;
	&lt;option value=&quot;YUI&quot;&gt;
&lt;/datalist&gt;
</pre>
<p><strong>Source/Demo: <a href="http://davidwalsh.name/datalist">http://davidwalsh.name/datalist</a></strong></p>
<h2>Hidden elements using HTML5</h2>
<p>HTML5 introduce the <code>hidden</code> attribute, which allow you to hide a specific element, as you would do it in CSS using <code>display:none</code>.</p>
<pre>
&lt;p hidden&gt;You can&#39;t see this text&lt;/p&gt;
</pre>
<p><strong>Source: <a href="http://html5demos.com/hidden">http://html5demos.com/hidden</a></strong></p>
<h2>element with autofocus</h2>
<p>The <code>autofocus</code> attribute allow you to force the focus on a specific element. Useful for search pages such as google.com homepage.</p>
<pre>
&lt;input autofocus=&quot;autofocus&quot; /&gt;
</pre>
<p><strong>Source: <a href="http://davidwalsh.name/autofocus">http://davidwalsh.name/autofocus</a></strong></p>
<h2>HTML5 prefetching</h2>
<p>Some time ago I wrote <a href="http://www.catswhocode.com/blog/mastering-html5-prefetching">a detailed article</a> about HTML5 prefetching. Basically, prefetching is a simple technique to prefetch and load a resource which is not included in the current page.</p>
<p>The example below shows the prefetching of an image:</p>
<pre>
&lt;link rel=&quot;prefetch&quot; href=&quot;http://www.catswhocode.com/wp-content/uploads/my_image.png&quot;&gt;
</pre>
<p><strong>Source: <a href="http://www.catswhocode.com/blog/mastering-html5-prefetching">http://www.catswhocode.com/blog/mastering-html5-prefetching</a></strong></p>
<h2>Playing audio files with HTML5</h2>
<p>HTML5 can play videos as I shown you before, and of course it can also play audio files such as the popular <code>mp3</code> format. As an example, here is a minimalist but functional audio player. </p>
<pre>
&lt;audio id=&quot;player&quot; src=&quot;sound.mp3&quot;&gt;&lt;/audio&gt;
&lt;div&gt;
	&lt;button onclick=&quot;document.getElementById(&#39;player&#39;).play()&quot;&gt;Play&lt;/button&gt;
	&lt;button onclick=&quot;document.getElementById(&#39;player&#39;).pause()&quot;&gt;Pause&lt;/button&gt;
	&lt;button onclick=&quot;document.getElementById(&#39;player&#39;).volume+=0.1&quot;&gt;Volume Up&lt;/button&gt;
	&lt;button onclick=&quot;document.getElementById(&#39;player&#39;).volume-=0.1&quot;&gt;Volume Down&lt;/button&gt;
&lt;/div&gt; 
</pre>
<p><strong>Source: <a href="http://www.catswhocode.com/blog/mastering-the-html5-audio-property">http://www.catswhocode.com/blog/mastering-the-html5-audio-property</a></strong></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/7Wm4E1aPU6Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/html5-code-snippets-to-take-your-website-to-the-next-level/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>WordPress snippets, hacks and tips to enhance your comments section</title>
		<link>http://www.catswhocode.com/blog/wordpress-snippets-hacks-and-tips-to-enhance-your-comments-section</link>
		<comments>http://www.catswhocode.com/blog/wordpress-snippets-hacks-and-tips-to-enhance-your-comments-section#comments</comments>
		<pubDate>Mon, 18 Feb 2013 15:12:32 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5360</guid>
		<description><![CDATA[Comments are a very important aspect of a blog because it is where the readers interact with the blogger. In today's article, I'm showing you lots of WordPress snippets, hacks and tips to enhance your blog comments section. ]]></description>
				<content:encoded><![CDATA[<h2>Allow more HTML tags in WordPress comments</h2>
<p>By default, WordPress allow commenters to use some HTML tags in the comment textarea. But depending on your blog, you might want to allow the use of more tags. </p>
<p>To do so, simply paste the code below into your <code>functions.php</code> file. The list of allowed tags can be modified on line 4.</p>
<pre>
// Create function which allows more tags within comments
function allow_pres() {
  global $allowedtags;
  $allowedtags[&#39;pre&#39;] = array(&#39;class&#39;=&gt;array());
}

// Add WordPress hook to use the function
add_action(&#39;comment_post&#39;, &#39;allow_pres&#39;);
</pre>
<p><strong>&raquo; Source: <a href="http://davidwalsh.name/wordpress-comment-tags">http://davidwalsh.name/wordpress-comment-tags</a></strong></p>
<h2>Remove autolinks in comments</h2>
<p>When a commenter paste a url link into the comment form, WordPress automatically transform it into a hypertext link. This is good on most cases, but personally I do not like this as many people used my blog comments to advertise their own products and services.</p>
<p>Removing autolinks in comments is super easy: Just insert the line of code below into your <code>functions.php</code> file.</p>
<pre>
remove_filter('comment_text', 'make_clickable', 9);
</pre>
<p><strong>&raquo; Source: <a href="http://www.wprecipes.com/wordpress-hack-remove-autolinks-in-comments">http://www.wprecipes.com/wordpress-hack-remove-autolinks-in-comments</a></strong></p>
<h2>Remove the url field from WordPress comments form</h2>
<p>If you don&#8217;t want your commenters to be able to enter their website url, here is a snippet to remove the url field from WordPress comment form. </p>
<p>Simple paste the code below in your <code>functions.php</code> file, save it, and you&#8217;re done.</p>
<pre>
function remove_comment_fields($fields) {
    unset($fields[&#39;url&#39;]);
    return $fields;
}
add_filter(&#39;comment_form_default_fields&#39;,&#39;remove_comment_fields&#39;);
</pre>
<p><strong>&raquo; Source: <a href="http://wp.tutsplus.com/tutorials/creative-coding/customizing-comments-in-wordpress-functionality-and-appearance/">http://wp.tutsplus.com/tutorials/creative-coding/customizing-comments&#8230;</a></strong></p>
<h2>Add more fields to the comments form</h2>
<p>I just shown you how to remove a field from the comment form, but now, what if you want to add a new field to the form? The following example will add a new field for the commenter to add his age.</p>
<p>Let&#8217;s start by adding the field. To do this, copy the code below and paste it in your <code>functions.php</code> file:</p>
<pre>
function add_comment_fields($fields) {
 
    $fields[&#39;age&#39;] = &#39;&lt;p class=&quot;comment-form-age&quot;&gt;&lt;label for=&quot;age&quot;&gt;&#39; . __( &#39;Age&#39; ) . &#39;&lt;/label&gt;&#39; .
        &#39;&lt;input id=&quot;age&quot; name=&quot;age&quot; type=&quot;text&quot; size=&quot;30&quot; /&gt;&lt;/p&gt;&#39;;
    return $fields;
 
}
add_filter(&#39;comment_form_default_fields&#39;,&#39;add_comment_fields&#39;);

function add_comment_meta_values($comment_id) {
 
    if(isset($_POST[&#39;age&#39;])) {
        $age = wp_filter_nohtml_kses($_POST[&#39;age&#39;]);
        add_comment_meta($comment_id, &#39;age&#39;, $age, false);
    }
 
}
add_action (&#39;comment_post&#39;, &#39;add_comment_meta_values&#39;, 1);
</pre>
<p>Now, to display the age of the commenter, use the following code:</p>
<pre>&lt;?php echo &quot;Comment authors age: &quot;.get_comment_meta( $comment-&gt;comment_ID, &#39;age&#39;, true ); ?&gt;</pre>
<p><strong>&raquo; Source: <a href="http://wp.tutsplus.com/tutorials/creative-coding/customizing-comments-in-wordpress-functionality-and-appearance/">http://wp.tutsplus.com/tutorials/creative-coding/customizing-comments&#8230;</a></strong></p>
<h2>Insert comments programatically</h2>
<p>On some specific cases, you might want to insert comments programmatically. Doing so is definitely easy, as shown below. Simply execute this code and it will add a new comment in your database.</p>
<pre>
$data = array(
	&#39;comment_post_ID&#39; =&gt; 1,
	&#39;comment_author&#39; =&gt; &#39;admin&#39;,
	&#39;comment_author_email&#39; =&gt; &#39;admin@admin.com&#39;,
	&#39;comment_author_url&#39; =&gt; &#39;http://www.catswhocode.com&#39;,
	&#39;comment_content&#39; =&gt; &#39;Lorem ipsum dolor sit amet...&#39;,
	&#39;comment_author_IP&#39; =&gt; &#39;127.0.0.1&#39;,
	&#39;comment_agent&#39; =&gt; &#39;Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3&#39;,
	&#39;comment_date&#39; =&gt; date(&#39;Y-m-d H:i:s&#39;),
	&#39;comment_date_gmt&#39; =&gt; date(&#39;Y-m-d H:i:s&#39;),
	&#39;comment_approved&#39; =&gt; 1,
);

$comment_id = wp_insert_comment($data);
</pre>
<p><strong>&raquo; Source: <a href="http://www.wprecipes.com/wordpress-hack-insert-comments-programatically">http://www.wprecipes.com/wordpress-hack-insert-comments-programatically</a></strong></p>
<h2>Automatically disable commenting on posts older than X days</h2>
<p>If your blog is very popular, you probably receive lots of comments, some on very old posts&#8230; So why not automatically disable commenting on posts older than X days?</p>
<p>Paste the code below in your <code>functions.php</code> file. The code will disable comments on post older than 30 days. The amount of days can be changed on line 3.</p>
<pre>
function close_comments( $posts ) {
	if ( !is_single() ) { return $posts; }
	if ( time() - strtotime( $posts[0]-&gt;post_date_gmt ) &gt; ( 30 * 24 * 60 * 60 ) ) {
		$posts[0]-&gt;comment_status = &#39;closed&#39;;
		$posts[0]-&gt;ping_status    = &#39;closed&#39;;
	}
	return $posts;
}
add_filter( &#39;the_posts&#39;, &#39;close_comments&#39; ); 
</pre>
<p><strong>&raquo; Source: <a href="http://perishablepress.com/wordpress-tip-disable-comments-in-old-posts-via-php/">http://perishablepress.com/wordpress-tip-disable-comments-in-old-posts-via-php/</a></strong></p>
<h2>Add target=&#8221;blank&#8221; to all links in comment text</h2>
<p>Using the HTML <code>target="blank"</code> attribute is generally discouraged as this force the opening of a link in a new tab or window, but I know how clients like it. So if you need to add a <code>target="blank"</code> attribute to every links in comments text, just paste the code shown below in your <code>functions.php</code> and you&#8217;ll get the job done. </p>
<pre>
function autoblank($text) {
	$return = str_replace(&#39;&lt;a&#39;, &#39;&lt;a target=&quot;_blank&quot;&#39;, $text);
	return $return;
}
add_filter(&#39;comment_text&#39;, &#39;autoblank&#39;);
</pre>
<p><strong>&raquo; Source: <a href="http://www.catswhocode.com/blog/snippets/add-target_blank-on-all-link">http://www.catswhocode.com/blog/snippets/add-target_blank-on-all-link</a></strong></p>
<h2>Customize comments markup</h2>
<p>By default, WordPress outputs a standard comments list, but if can be customized if needed. Paste the following code into your <code>functions.php</code> file and customize as desired. </p>
<pre>
function my_custom_comments($comment, $args, $depth) {
   $GLOBALS[&#39;comment&#39;] = $comment; ?&gt;
   &lt;li &lt;?php comment_class(); ?&gt; id=&quot;li-comment-&lt;?php comment_ID() ?&gt;&quot;&gt;
   &lt;?php if ($comment-&gt;comment_approved == &#39;0&#39;) : ?&gt;
      &lt;em&gt;&lt;?php _e(&#39;Your comment is awaiting moderation.&#39;) ?&gt;&lt;/em&gt;
   &lt;?php endif; ?&gt;

   // Comments markup code here, e.g. functions like comment_text(); 

}
</pre>
<p>Once done, use the following line of code in <code>comments.php</code> to display your custom comment markup: </p>
<pre>
&lt;?php wp_list_comments(&quot;callback=my_custom_comments&quot;); ?&gt;
</pre>
<p><strong>&raquo; Source: <a href="http://css-tricks.com/snippets/wordpress/customize-comments-markup/">http://css-tricks.com/snippets/wordpress/customize-comments-markup/</a></strong></p>
<h2>Disable comments feeds in individual posts</h2>
<p>By default, WordPress create RSS feeds for all individual posts. If you don&#8217;t want or need them, you can disable them with the following code snippet. Simply paste it in your <code>functions.php</code> file and you&#8217;ll get rid of individual post feeds.</p>
<pre>
// disable comment feeds for individual posts
function disablePostCommentsFeedLink($for_comments) {
	return;
}
add_filter(&#39;post_comments_feed_link&#39;,&#39;disablePostCommentsFeedLink&#39;);
</pre>
<p><strong>&raquo; Source: <a href="http://digwp.com/2009/11/disable-comment-feeds-individual-posts/">http://digwp.com/2009/11/disable-comment-feeds-individual-posts/</a></strong></p>
<p><em>Want more WordPress tips and snippets? Then have a look to <a href="http://www.wprecipes.com">WPRecipes</a>, another blog of mine!</em></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/iG9R-7I6k3o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/wordpress-snippets-hacks-and-tips-to-enhance-your-comments-section/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Modern CSS3 techniques to embellish your website</title>
		<link>http://www.catswhocode.com/blog/modern-css3-techniques-to-embellish-your-website</link>
		<comments>http://www.catswhocode.com/blog/modern-css3-techniques-to-embellish-your-website#comments</comments>
		<pubDate>Mon, 04 Feb 2013 15:21:29 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5344</guid>
		<description><![CDATA[The CSS3 specification allows front-end developers to create sophisticated visual effects to make websites look better. I have compiled over 10 new CSS3 techniques to embellish your website and give it a more professional look and feel.]]></description>
				<content:encoded><![CDATA[<h2>Black and white images using CSS3</h2>
<p>The following CSS class will display any color image in black and white. The vendor prefix allows the trick to work on any browser.</p>
<pre>
img.desaturate { 
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
}
</pre>
<p><strong>Source/Demo: <a href="http://demosthenes.info/blog/532/Convert-Images-To-Black--White-With-CSS">http://demosthenes.info/blog/532/Convert-Images-To-Black&#8211;White-With-CSS</a></strong></p>
<h2>Page top shadow in CSS3</h2>
<p>Here is a simple snippet to give your website a nice page top shadow. Easy to apply and visually pleasant!</p>
<pre>
body:before {
          content: "";
          position: fixed;
          top: -10px;
          left: 0;
          width: 100%;
          height: 10px;

          -webkit-box-shadow: 0px 0px 10px rgba(0,0,0,.8);
          -moz-box-shadow: 0px 0px 10px rgba(0,0,0,.8);
          box-shadow: 0px 0px 10px rgba(0,0,0,.8);

          z-index: 100;
}
</pre>
<p><strong>Source/Demo: <a href="http://playground.genelocklin.com/depth/">http://playground.genelocklin.com/depth/</a></strong></p>
<h2>Detecting double-clicks in CSS3</h2>
<p>Believe it or not, it&#8217;s possible to detect when an element has been double-clicked by using just CSS, as demonstrated in the following code:</p>
<pre>
&lt;div class=&quot;test3&quot;&gt;
  &lt;span&gt;&lt;input type=&quot;text&quot; value=&quot;&amp;nbsp;&quot; readonly=&quot;true&quot; /&gt;
  &lt;a href=&quot;http://google.com&quot;&gt;Double click me&lt;/a&gt;&lt;/span&gt;
&lt;/div&gt;

&lt;style type=&quot;text/css&quot;&gt;
.test3 span {
	position: relative;
}
.test3 span a { 
	position: relative;
	z-index: 2; 
}
.test3 span a:hover, .test3 span a:active { 
	z-index: 4; 
}
.test3 span input { 
	background: transparent; 
	border: 0; 
	cursor: pointer; 
	position: absolute; 
	top: -1px; 
	left: 0; 
	width: 101%;  /* Hacky */
	height: 301%; /* Hacky */
	z-index: 3; 
}
.test3 span input:focus { 
	background: transparent; 
	border: 0; 
	z-index: 1; 
}
&lt;/style&gt;
</pre>
<p><strong>Source/Demo: <a href="http://css-tricks.com/examples/CSSDoubleClick/">http://css-tricks.com/examples/CSSDoubleClick/</a></strong></p>
<h2>Triangles in CSS3</h2>
<p>Yes, it&#8217;s actually possible to draw triangles using only CSS. Although it&#8217;s probably not the best way of doing it, I still find this technique pretty useful and interesting.</p>
<pre>
/* create an arrow that points up */
div.arrow-up {
  width:0px; 
  height:0px; 
  border-left:5px solid transparent;  /* left arrow slant */
  border-right:5px solid transparent; /* right arrow slant */
  border-bottom:5px solid #2f2f2f; /* bottom, add background color here */
  font-size:0px;
  line-height:0px;
}

/* create an arrow that points down */
div.arrow-down {
  width:0px; 
  height:0px; 
  border-left:5px solid transparent;
  border-right:5px solid transparent;
  border-top:5px solid #2f2f2f;
  font-size:0px;
  line-height:0px;
}

/* create an arrow that points left */
div.arrow-left {
  width:0px; 
  height:0px; 
  border-bottom:5px solid transparent;  /* left arrow slant */
  border-top:5px solid transparent; /* right arrow slant */
  border-right:5px solid #2f2f2f; /* bottom, add background color here */
  font-size:0px;
  line-height:0px;
}

/* create an arrow that points right */
div.arrow-right {
  width:0px; 
  height:0px; 
  border-bottom:5px solid transparent;  /* left arrow slant */
  border-top:5px solid transparent; /* right arrow slant */
  border-left:5px solid #2f2f2f; /* bottom, add background color here */
  font-size:0px;
  line-height:0px;
}
</pre>
<p><strong>Source/Demo: <a href="http://davidwalsh.name/css-triangles">http://davidwalsh.name/css-triangles</a></strong></p>
<h2>Using CSS calc()</h2>
<p><code>calc()</code> works like a function and allow you to perform calculations to determine the size and shape of objects. It can be used anywhere a length is required.</p>
<pre>
/* basic calc */
.simpleBlock {
  width: calc(100% - 100px);
}

/* calc in calc */
.complexBlock {
  width: calc(100% - 50% / 3);
  padding: 5px calc(3% - 2px);
  margin-left: calc(10% + 10px);
}
</pre>
<p><strong>Source/Demo: <a href="http://davidwalsh.name/css-calc">http://davidwalsh.name/css-calc</a></strong></p>
<h2>Pure CSS text gradients</h2>
<p>Text gradients have always been popular on the internet. Now with CSS3, it&#8217;s a lot easier to create beautiful gradients in a matter of minutes.</p>
<pre>
h2[data-text] {
	position: relative;
}
h2[data-text]::after {
	content: attr(data-text);
	z-index: 10;
	color: #e3e3e3;
	position: absolute;
	top: 0;
	left: 0;
	-webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0)), color-stop(50%, rgba(0,0,0,1)), to(rgba(0,0,0,0)));
</pre>
<p><strong>Source: <a href="http://snipplr.com/view/49911/pure-css-text-gradients/">http://snipplr.com/view/49911/pure-css-text-gradients/</a></strong></p>
<h2>Disabling pointer events with CSS</h2>
<p>The newly introduced <code>pointer-events</code> property allow you to deactivate pointer events on an element. For example, a link with the following class will not be clickable anymore. </p>
<pre>
.disabled { pointer-events: none; }
</pre>
<p><strong>Source/Demo: <a href="http://davidwalsh.name/pointer-events">http://davidwalsh.name/pointer-events</a></strong></p>
<h2>Stiched elements in CSS3</h2>
<p>The following code snippet shows how to create a nice stitched look around any element. Nice!</p>
<pre>
p {
	padding: 5px 10px;
	margin: 10px;
	background: #ff0030;
	color: #fff;
	font-size: 21px;
	line-height: 1.3em;
	border: 2px dashed #fff;
	border-radius: 3px;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	-moz-box-shadow: 0 0 0 4px #ff0030, 2px 1px 4px 4px rgba(10,10,0,.5);
	-webkit-box-shadow: 0 0 0 4px #ff0030, 2px 1px 4px 4px rgba(10,10,0,.5);
	box-shadow: 0 0 0 4px #ff0030, 2px 1px 6px 4px rgba(10,10,0,.5);
	text-shadow: -1px -1px #aa3030;
}
</pre>
<p><strong>Source: <a href="http://www.catswhocode.com/blog/snippets/stitched-elements-in-css3">http://www.catswhocode.com/blog/snippets/stitched-elements-in-css3</a></strong></p>
<h2>Custom scrollbars with CSS3 and WebKit</h2>
<p>Remember 10 years ago where almost anyone used Microsoft exclusive properties to customize the look of scrollbars? Well, now you can do the same with Webkit.  </p>
<pre>
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: none;
}

::-webkit-scrollbar-thumb {
  background: -webkit-linear-gradient(left, #547c90, #002640);
  border: 1px solid #333;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.4);
}
</pre>
<p><strong>Source/Demo: <a href="http://davidwalsh.name/custom-scrollbars">http://davidwalsh.name/custom-scrollbars</a></strong></p>
<h2>Blurry text with CSS3</h2>
<p>A simple but very nice text blur effect. Easy and good-looking!</p>
<pre>
.blur {
   color: transparent;
   text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
</pre>
<p><strong>Source/Demo: <a href="http://css-tricks.com/snippets/css/blurry-text/">http://css-tricks.com/snippets/css/blurry-text/</a></strong></p>
<h2>Pure CSS corner ribbon</h2>
<p>This code is a bit long, but it creates a fancy corner ribbon in pure CSS. </p>
<pre>
&lt;div class=&quot;wrapper&quot;&gt;
       &lt;div class=&quot;ribbon-wrapper-green&quot;&gt;&lt;div class=&quot;ribbon-green&quot;&gt;NEWS&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>And the CSS:</p>
<pre>
.wrapper {
  margin: 50px auto;
  width: 280px;
  height: 370px;
  background: white;
  border-radius: 10px;
  -webkit-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
  -moz-box-shadow:    0px 0px 8px rgba(0,0,0,0.3);
  box-shadow:         0px 0px 8px rgba(0,0,0,0.3);
  position: relative;
  z-index: 90;
}

.ribbon-wrapper-green {
  width: 85px;
  height: 88px;
  overflow: hidden;
  position: absolute;
  top: -3px;
  right: -3px;
}

.ribbon-green {
  font: bold 15px Sans-Serif;
  color: #333;
  text-align: center;
  text-shadow: rgba(255,255,255,0.5) 0px 1px 0px;
  -webkit-transform: rotate(45deg);
  -moz-transform:    rotate(45deg);
  -ms-transform:     rotate(45deg);
  -o-transform:      rotate(45deg);
  position: relative;
  padding: 7px 0;
  left: -5px;
  top: 15px;
  width: 120px;
  background-color: #BFDC7A;
  background-image: -webkit-gradient(linear, left top, left bottom, from(#BFDC7A), to(#8EBF45)); 
  background-image: -webkit-linear-gradient(top, #BFDC7A, #8EBF45); 
  background-image:    -moz-linear-gradient(top, #BFDC7A, #8EBF45); 
  background-image:     -ms-linear-gradient(top, #BFDC7A, #8EBF45); 
  background-image:      -o-linear-gradient(top, #BFDC7A, #8EBF45); 
  color: #6a6340;
  -webkit-box-shadow: 0px 0px 3px rgba(0,0,0,0.3);
  -moz-box-shadow:    0px 0px 3px rgba(0,0,0,0.3);
  box-shadow:         0px 0px 3px rgba(0,0,0,0.3);
}

.ribbon-green:before, .ribbon-green:after {
  content: &quot;&quot;;
  border-top:   3px solid #6e8900;   
  border-left:  3px solid transparent;
  border-right: 3px solid transparent;
  position:absolute;
  bottom: -3px;
}

.ribbon-green:before {
  left: 0;
}
.ribbon-green:after {
  right: 0;
}
</pre>
<p><strong>Source/Demo: <a href="http://jsfiddle.net/chriscoyier/H6rQ6/1/">http://jsfiddle.net/chriscoyier/H6rQ6/1/</a></strong></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/DB2ZQ8nHmiU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/modern-css3-techniques-to-embellish-your-website/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Super useful online tools to make JavaScript development easier</title>
		<link>http://www.catswhocode.com/blog/super-useful-online-tools-to-make-javascript-development-easier</link>
		<comments>http://www.catswhocode.com/blog/super-useful-online-tools-to-make-javascript-development-easier#comments</comments>
		<pubDate>Mon, 21 Jan 2013 15:08:32 +0000</pubDate>
		<dc:creator>Jean-Baptiste Jung</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.catswhocode.com/blog/?p=5312</guid>
		<description><![CDATA[Since over 15 years, JavaScript allows web developers to interact with the client browser. Today, I have compiled a list of the most useful online tools to make your JavaScript developer life even easier.]]></description>
				<content:encoded><![CDATA[<h2>JSBeautifier</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/jsbeautifier.png" alt="" /><br />
Is your JavaScript code ugly or hard to read? If yes, no problem: Here is JS Beautifier, a handy tool to make your JS code more prettier and easier to read. JS Beautifier can also deobfuscate code, which can be very useful in several situations.<br />
<strong>&rarr; Visit <a href="http://jsbeautifier.org/">JSBeautifier</a></strong></p>
<h2>JSconsole</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2012/12/jsconsole.png" alt="" /><br />
When developing JavaScript, debugging is not always easy and finding errors in your code can be very time-consuming. This tool, named, <em>JSconsole</em>, allow easy online debugging of any JS code. A real time-saver!<br />
<strong>&rarr; Visit <a href="http://jsconsole.com/">JSconsole</a></strong></p>
<h2>jsFiddle</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/jsfiddle.png" alt="" /><br />
jsFiddle is a complete playground for web developers. It allows you to edit JavaScript, HTML and CSS snippets and share, embed or tweet them.<br />
<strong>&rarr; Visit <a href="http://jsfiddle.net/">jsFiddle</a></strong></p>
<h2>JS Mini</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/jsmini.png" alt="" /><br />
Speed is always a concern when it comes to web development. As users don&#8217;t like to wait, you have to make sure that your code will be fast to load. To do so, you should definitely make your JavaScript and jQuery code lightweight using this online tool. Code can be reduced up to 60%.<br />
<strong>&rarr; Visit <a href="http://www.jsmini.com/">JS Mini</a></strong></p>
<h2>JavaScript Obfuscator</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/obfuscator.png" alt="" /><br />
Sometimes you might want to prevent from people being able to have a look at your JavaScript code. The best solution is to obfuscate your code and make it a lot harder to understand for people. This handy tool allows you to obfuscate your code online.<br />
<strong>&rarr; Visit <a href="http://www.javascriptobfuscator.com/">JavaScript Obfuscator</a></strong></p>
<h2>Regex Pal</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/regexpal.png" alt="" /><br />
Regular expressions are very useful in programming, but they can also be very tricky, especially for beginners. If you need to test a JavaScript regular expression, this website is the perfect tool to do so.<br />
<strong>&rarr; Visit <a href="http://regexpal.com/">Regex Pal</a></strong></p>
<h2>JS Lint</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/jslint.png" alt="" /><br />
JS Lint is a very useful tool that takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem and an approximate location.<br />
<strong>&rarr; Visit <a href="http://jslint.com/">JS Lint</a></strong></p>
<h2>JS String Escape</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/htmlescape1.png" alt="" /><br />
In JavaScript, special characters inside a String can really mess things up. The web server can read the JavaScript file, using the wrong encoding, the users browser can have the wrong encoding setting. A way to avoid that is to use escape codes. This online JavaScript escape tool does that automatically.<br />
<strong>&rarr; Visit <a href="http://www.htmlescape.net/stringescape_tool.html">JS String Escape</a></strong></p>
<h2>JS Pretty</h2>
<p><img src="http://www.catswhocode.com/blog/wp-content/uploads/2013/01/jspretty.png" alt="" /><br />
JS Pretty is a free online JavaScript and jQuery beautifier tool that uncompresses and uncompacts your js code so it is readable and aligns it so it looks pretty.<br />
<strong>&rarr; Visit <a href="http://www.jspretty.com/">JS Pretty</a></strong></p>
<img src="http://feeds.feedburner.com/~r/Catswhocode/~4/t3poZBkAIqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.catswhocode.com/blog/super-useful-online-tools-to-make-javascript-development-easier/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: www.catswhocode.com @ 2013-05-14 19:41:54 by W3 Total Cache -->
