<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="http://www.bytemycode.com/rssformat.xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>byteMyCode: Snippet Revisions</title>
		<link>http://www.bytemycode.com</link>
		<description>Revisions for this snippet.</description>
		<pubDate>Sat, 30 Aug 2008 10:28:58 +0000</pubDate>
		<copyright>1998-2008 </copyright>
		<language>en-us</language>
		<image>
		      <link>http://www.bytemycode.com</link>
		      <url>http://www.bytemycode.com/img/rss_title.gif</url>
		      <title>byteMyCode</title>
		</image>

	
	<item>
		<title>Class-based Javascript analog clock 1</title>
		<link>http://www.bytemycode.com/snippets/snippet/418/1/</link>
		<comments>http://www.bytemycode.com/snippets/snippet/418/comments/</comments>
		<pubDate>Thu, 05 Oct 2006 22:26:13 +0000</pubDate>
		<dc:creator>Fordiman</dc:creator>
		<category>"stupid, clock", JavaScript</category>
		<guid isPermaLink="false">http://www.bytemycode.com/snippets/snippet/418/</guid>
		<description>
			<![CDATA[
				<p>This is an analog clock script designed to jump in place of a div element of class 'analogclock'.<br /><br />The div tag is not replaced in this custom element, but instead is used as a pseudo-document to hold the clock itself. The 'hands' are implemented using arrays of generated divs.<br /><br />I was actually inspired to write this widget because of an article on About.com's Javascript pages written by a guy named Stephen Chapman. His code was a mess, but I only discovered this after delving through two layers of 'unescape()' obfuscation.<br /><br />The basics: You control the look of the numbers and the 'box' model of the clock using basic CSS. You control the clock's size (it will always be square) using the 'size' attribute.<br /><br />The 'seconds', 'minutes', and 'hours' attributes are for the color of the 'hand's. 'numstyle' can be 1, i, I, or '.', each refering to a different type of face-numbering for the clock<br /><br />The 'localzone' attribute tells the script to use the user's local time zone. If it's '0', 'false' or 'no', the clock will use the 'clockzone' attribute to determine what time it is (the clock zone is relative to GMT, so, for example, US Eastern is -5. The clock automagically figures out if we're in DST, so you don't have to.)<br /><br />The 'city' and 'country' are for if you want to put in the city/country of origin for your clock. To be honest, you can put anything there.<br /><br />Lastly, I designed my version of the clock to be able to not 'tick', i.e., work like the old-school analog clocks. If you want ticking, add 'tick=1' to the attribute list<br /><br />As with all of my widgets, the idea here is that you can just  include the .js file and start dropping in tags without needing to know any ECMAScript at all.<br /><br />Additionally, for you ECMAScripters, I was very careful to keep my pollution of the global namespace to one class: analogClock.<br /><br />Example of use:<br /> <br /><blockquote><br /><br /><br /></blockquote></p>
			]]>
		</description>
	</item>

	
	</channel>
</rss>