<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notepad Web Development &#187; Code Snippets</title>
	<atom:link href="http://notepadwebdevelopment.com/archives/category/blog/code-snippets/feed" rel="self" type="application/rss+xml" />
	<link>http://notepadwebdevelopment.com</link>
	<description>Project portfolio</description>
	<lastBuildDate>Sat, 04 Feb 2012 22:30:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Auto clearing text inputs</title>
		<link>http://notepadwebdevelopment.com/archives/673</link>
		<comments>http://notepadwebdevelopment.com/archives/673#comments</comments>
		<pubDate>Thu, 08 Dec 2011 12:29:50 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=673</guid>
		<description><![CDATA[
$('input[type=&#34;text&#34;]').each(function (i, el) {
if ($(this).val() == &#34;&#34;) return false;
$(this)
.data('defaultText', $(this).val())
.focus(function (e) { if ($(this).val() == $(this).data('defaultText')) $(this).val(''); })
.blur(function (e) { if ($(el).val() == '') $(el).val($(this).data('defaultText')); });
});

]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/673/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unversion a local repo</title>
		<link>http://notepadwebdevelopment.com/archives/639</link>
		<comments>http://notepadwebdevelopment.com/archives/639#comments</comments>
		<pubDate>Fri, 11 Mar 2011 09:52:40 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=639</guid>
		<description><![CDATA[rm -rf `find . -type d -name .svn`
This will remove every .svn folder beginning from current directory.
]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/639/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jquery plugin class based template</title>
		<link>http://notepadwebdevelopment.com/archives/618</link>
		<comments>http://notepadwebdevelopment.com/archives/618#comments</comments>
		<pubDate>Sat, 11 Dec 2010 23:36:17 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Template]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=618</guid>
		<description><![CDATA[
(function($){
	/*
	 *		Jquery Plugin Template
	 */

	$.fn.pluginTemplate = function(options) {

		return this.each(function() {
			var el = $(this);
			if (el.data('pluginTemplate')) return; 		// Return early if already exists on this element
			var pT = new pluginTemplate(this, options);	// Create object from our class
			el.data('pluginTemplate', pT);			// store the object as data() attached to target jquery object

			pT.init();
		});
	};

	var pluginTemplate = function(el, options) {

		var obj 	 = this;		// Ref [...]]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/618/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Netvibes UWA Widget Template</title>
		<link>http://notepadwebdevelopment.com/archives/613</link>
		<comments>http://notepadwebdevelopment.com/archives/613#comments</comments>
		<pubDate>Sun, 29 Aug 2010 23:26:15 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[UWA Template]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=613</guid>
		<description><![CDATA[
&#60;?xml version=&#34;1.0&#34; encoding=&#34;utf-8&#34;?&#62;
&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; &#34;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#34;&#62;
&#60;html 	xmlns=&#34;http://www.w3.org/1999/xhtml&#34;
		xmlns:widget=&#34;http://www.netvibes.com/ns/&#34;  &#62;
  &#60;head&#62;

    &#60;meta name=&#34;author&#34;      content=&#34;Stephen Griffin&#34; /&#62;
    &#60;meta name=&#34;website&#34;     content=&#34;http://notepadwebdevelopment.com&#34; /&#62;
    &#60;meta name=&#34;description&#34; content=&#34;Template for developing Netvibes UWA widgets&#34; /&#62;
    &#60;meta [...]]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/613/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Singleton workaround example</title>
		<link>http://notepadwebdevelopment.com/archives/606</link>
		<comments>http://notepadwebdevelopment.com/archives/606#comments</comments>
		<pubDate>Tue, 13 Jul 2010 09:11:36 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=606</guid>
		<description><![CDATA[
package
{
	public class YourSingletonClass
	{
		private static var _instance : YourSingletonClass;

		public function YourSingletonClass(pvt:PrivateClass) { }

		public static function getInstance():YourSingletonClass
		{
			if (YourSingletonClass._instance == null) {
				YourSingletonClass._instance = new YourSingletonClass(new PrivateClass());
			} else {
				trace(&#34;No can do - already gots me an instance of this class&#34;);
			}
			return YourSingletonClass._instance;
		}
	}
}
// Workaround to enable Singleton pattern, because private
// class declarations are unsupported within AS3
class PrivateClass
{
	public function PrivateClass() { }
}

]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/606/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A basic AS3 custom event template</title>
		<link>http://notepadwebdevelopment.com/archives/588</link>
		<comments>http://notepadwebdevelopment.com/archives/588#comments</comments>
		<pubDate>Tue, 15 Jun 2010 10:37:57 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=588</guid>
		<description><![CDATA[
package  {
	import flash.events.Event;
	import YourClass;

	public class YourClassEvent extends Event
	{
		public static const SOMETHING:String = &#34;something&#34;;
		private var _object:YourClass;

		public function YourClassEvent (type:String, object:YourClass)
		{
			super(type);
			_object	= object;
		}

		public function get object():YourClass
		{
           return _object;
		}

		override public function clone():Event
		{
           return new YourClassEvent(type, _object);
		}
	}
}

]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/588/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic resizing full bleed background image</title>
		<link>http://notepadwebdevelopment.com/archives/572</link>
		<comments>http://notepadwebdevelopment.com/archives/572#comments</comments>
		<pubDate>Thu, 04 Mar 2010 11:32:13 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Sense Internet]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=572</guid>
		<description><![CDATA[
Loading flash content&#8230;

This was a quick mock-up done in Flash CS3 for a pitch for a new site for Harrogate Ladies college. The background images rotate thorugh a slideshow and will dynamically resize as you change the size of your browser window. In order to see this working you will need to view the swf [...]]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/572/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing jQuery for Wordpress</title>
		<link>http://notepadwebdevelopment.com/archives/439</link>
		<comments>http://notepadwebdevelopment.com/archives/439#comments</comments>
		<pubDate>Sun, 17 Jan 2010 12:12:57 +0000</pubDate>
		<dc:creator>Stephen Griffin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://notepadwebdevelopment.com/?p=439</guid>
		<description><![CDATA[

( function($) {
$(document).ready( function() {
//-------------------------------

  // Your jQuery code here

//--------------------
} ); } ) ( jQuery );


Or alternatively, you can use no conflict mode, and use $j throughout your script instead of $


var $j = jQuery.noConflict();
$j(function(){

});



]]></description>
		<wfw:commentRss>http://notepadwebdevelopment.com/archives/439/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

