<?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>Dave Woods Freelance Web Designer UK &#187; Javascript</title>
	<atom:link href="http://www.dave-woods.co.uk/index.php/category/blog/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dave-woods.co.uk</link>
	<description></description>
	<lastBuildDate>Fri, 09 Dec 2011 11:26:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>HTML5 Placeholder Attribute</title>
		<link>http://www.dave-woods.co.uk/index.php/html5-placeholder-attribute/</link>
		<comments>http://www.dave-woods.co.uk/index.php/html5-placeholder-attribute/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 11:26:19 +0000</pubDate>
		<dc:creator>Dave Woods</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=861</guid>
		<description><![CDATA[Most of the attention for HTML5 has been given to the new elements and the use of video. However, one of the most useful features when creating forms is the introduction of the placeholder attribute for input elements. Previously if we wanted to include some placeholder text in an input field we&#8217;d have to either [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the attention for HTML5 has been given to the new elements and the use of video. However, one of the most useful features when creating forms is the introduction of the placeholder attribute for input elements.</p>
<p><span id="more-861"></span></p>
<p>Previously if we wanted to include some placeholder text in an input field we&#8217;d have to either use the value attribute or inject it using JavaScript, neither of which are the most accessible.</p>
<p>With HTML5 though, we can now use a new placeholder attribute to add text to the input field using the following:</p>
<p><code>&lt;input type="email" id="input-email" placeholder="Enter your email address"&gt;</code></p>
<h2>Placeholder Attribute Browser Support</h2>
<p>The latest versions of Firefox, Safari, Google Chrome and Opera all support the placeholder attribute. However, IE9 and below have no support for the placeholder text so it&#8217;s important to consider how input fields will appear on those IE browsers.</p>
<p>I&#8217;d fully expect IE10 to support the placeholder attribute but for now and for the foreseeable future while older versions of IE are being phased out, we&#8217;ll need to implement a fallback.</p>
<h2>Using the Label Element</h2>
<p>Regardless of the HTML5 spec not requiring a label element to be associated with an input element, I still think it&#8217;s a good idea for accessibility purposes to include a label so it&#8217;s clear and easy to see what the form field does.</p>
<p><code>&lt;label for="input-email"&gt;Email Address&lt;/label&gt;<br />
&lt;input type="email" id="input-email" placeholder="Enter your email address"&gt;</code></p>
<h2>jQuery Placeholder Attribute</h2>
<p>As well as using the label element to clearly identify what the input does, I&#8217;d also consider using a jQuery solution so that anyone using IE that has JavaScript available will also see the placeholder text.</p>
<p>Daniel Stocks has written an excellent jQuery placeholder plugin which you can download from Github here:</p>
<ul>
<li><a href="https://github.com/danielstocks/jQuery-Placeholder">jQuery Placeholder Plugin</a></li>
</ul>
<p>All you need to do, is download the plugin (either the uncompressed or minified version) and include the following lines of HTML and JavaScript, making sure that the jQuery plugin has the correct path.</p>
<p><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;&lt;/script&gt;<br />
&lt;script src="jquery.placeholder.js"&gt;&lt;/script&gt;<br />
&lt;script&gt;<br />
    $('input[placeholder], textarea[placeholder]').placeholder();<br />
&lt;/script&gt;</code></p>
<h2>Summary</h2>
<p>And there you have it, a consistent appearance for the placeholder element across all browsers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-woods.co.uk/index.php/html5-placeholder-attribute/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rounded Corners in Internet Explorer Using JQuery</title>
		<link>http://www.dave-woods.co.uk/index.php/rounded-corners-in-internet-explorer/</link>
		<comments>http://www.dave-woods.co.uk/index.php/rounded-corners-in-internet-explorer/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 10:15:58 +0000</pubDate>
		<dc:creator>Dave Woods</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.dave-woods.co.uk/index.php/rounded-corners-in-internet-explorer/</guid>
		<description><![CDATA[Recently I wrote an article on CSS3: Rounded CSS Corners, which is a great solution for creating rounded corners. However, Internet Explorer doesn&#8217;t yet support it, but there is a solution which this article explains. The following two links demonstrate a working version and also a zip file so you can download everything you need [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I wrote an article on <a href="http://www.dave-woods.co.uk/index.php/css3-rounded-css-corners/">CSS3: Rounded CSS Corners</a>, which is a great solution for creating rounded corners. However, Internet Explorer doesn&#8217;t yet support it, but there is a solution which this article explains.</p>
<p><span id="more-260"></span></p>
<p>The following two links demonstrate a working version and also a zip file so you can download everything you need to get this working.</p>
<ul>
<li><a href="http://www.dave-woods.co.uk/css3/ie-rounded-corners/">IE rounded corners demo</a></li>
<li><a href="http://www.dave-woods.co.uk/css3/ie-rounded-corners/ie-rounded-corners.zip">ie-rounded-corners.zip</a></li>
</ul>
<p>The HTML is pretty straight forward and uses the code from another article &#8211; <a href="http://www.dave-woods.co.uk/index.php/html5-tutorial-getting-started/">HTML5 tutorial: Getting Started</a>.</p>
<p>In order to get the rounded corners working in IE you&#8217;ll need <a href="http://jquery.com/">JQuery</a> and the <a href="http://www.malsup.com/jquery/corner/">JQuery corner script</a> both of which are included in the above zip file which I&#8217;ve then referenced from the HTML.</p>
<p><code>&lt;script src="js/jquery-1.3.2.min.js"&gt;&lt;/script&gt;<br />
&lt;script src="js/jquery.corner.js"&gt;&lt;/script&gt;</code></p>
<p>Next you&#8217;ll simply need to tell the browser which corners you want to be rounded.</p>
<p><code>&lt;script&gt;<br />
$("#container").corner();<br />
$("section").corner();<br />
$("aside").corner();<br />
$("#main-navigation a").corner("top 5px");<br />
&lt;/script&gt;</code></p>
<p>If you&#8217;re familiar with CSS at all then you should be able to easily see how this is applied using JavaScript as we&#8217;re simply using the element, ID or class within the quotes to target that part of the HTML.</p>
<h2>Summary</h2>
<p>And that&#8217;s all there is to it. You can create all kinds of rounded corner effects as shown on the <a href="http://www.malsup.com/jquery/corner/">rounded corners demo site</a>. Up until now, I&#8217;ve always created rounded corners using <a href="http://www.dave-woods.co.uk/index.php/css-rounded-corners-revisited/">this method</a> but seeing the simplicity of this Jquery solution, I am tempted to switch for Internet Explorer at least and rely on CSS3 for Webkit and Mozilla browsers.</p>
<p>What do you think? Are you still using images for rounded corner solutions or are the JavaScript and CSS3 methods becoming much more wide spread in the development community?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-woods.co.uk/index.php/rounded-corners-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Introducing: TeachMeJavaScript.com</title>
		<link>http://www.dave-woods.co.uk/index.php/introducing-teachmejavascriptcom/</link>
		<comments>http://www.dave-woods.co.uk/index.php/introducing-teachmejavascriptcom/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 17:06:04 +0000</pubDate>
		<dc:creator>Dave Woods</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.dave-woods.co.uk/index.php/introducing-teachmejavascriptcom/</guid>
		<description><![CDATA[I&#8217;ve decided that it&#8217;s time that I expanded my skillset and delved a bit more deeply into programming languages and made an effort to learn JavaScript properly. Therefore, I thought that it would be a good idea to document my progress and have created a blog over at TeachMeJavaScript.com which will detail everything that I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided that it&#8217;s time that I expanded my skillset and delved a bit more deeply into programming languages and made an effort to learn JavaScript properly.</p>
<p>Therefore, I thought that it would be a good idea to document my progress and have created a blog over at <a href="http://www.teachmejavascript.com">TeachMeJavaScript.com</a> which will detail everything that I learn as I progress.</p>
<p><span id="more-243"></span></p>
<p>I realise that TeachMeJavaScript.com might not be to everyone&#8217;s liking as it will start off at the very basics and gradually progress as I learn more about the language. So for anyone that has experience with JavaScript, they may find that it initially starts off at a very slow pace.</p>
<p>However, I&#8217;m sure that there are plenty of HTML/CSS web designers that are in a similar position to myself and are looking for the next skill to learn, in which case this may be just for you.</p>
<p>I thought it best to keep the JavaScript related articles and topics separate from this site so that anyone purely interested in HTML/CSS and web design can continue to read my posts here but for anyone interested in JavaScript please feel free to check out my new blog: <a href="http://www.teachmejavascript.com">TeachMeJavaScript.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-woods.co.uk/index.php/introducing-teachmejavascriptcom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

