<?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>le accidental occurrence &#187; webkit</title>
	<atom:link href="http://blog.42at.com/tag/webkit/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.42at.com</link>
	<description>42at</description>
	<lastBuildDate>Thu, 09 Jun 2011 07:00:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Introducing touch-enabled spinControl</title>
		<link>http://blog.42at.com/introducing-touch-enabled-spincontrol</link>
		<comments>http://blog.42at.com/introducing-touch-enabled-spincontrol#comments</comments>
		<pubDate>Sat, 06 Feb 2010 22:45:12 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=143</guid>
		<description><![CDATA[Hot on the heels of sliderControl comes its close cousin, the spinControl.   Whereas in the sliderControl, the thumb widget is moved across a fixed set of values to select the desired input, in the spinControl the whole set is movable.  This allows for larger set of data that can fit on the visible screen. All [...]]]></description>
			<content:encoded><![CDATA[<p>Hot on the heels of <a href="../slidercontrol">sliderControl </a>comes its  close cousin, the <strong>spinControl</strong>.   Whereas in the sliderControl, the thumb  widget is moved across a fixed set of values to select the desired  input, in the spinControl the whole set is movable.  This allows for  larger set of data that can fit on the visible screen.</p>
<p style="text-align: center;"><a href="http://blog.42at.com/spincontrol"><img class="aligncenter size-full wp-image-144" title="spin1" src="http://blog.42at.com/wp-content/uploads/2010/02/spin1.png" alt="" width="355" height="39" /></a></p>
<p>All the features of sliderControl are supported (kinetics, bounce, snap, toggle, events handlers, etc.).  Additionally, a new alignToEdge option allows the scroll area to align to the left and right edge of the viewport instead of its center.</p>
<p>For gory details, demo and download, see <a href="http://blog.42at.com/spincontrol">spinControl</a> page.</p>
<p><strong>Bonus</strong></p>
<p>Also included is a <strong>spinToggle </strong>class that mimic&#8217;s iPhone&#8217;s toggle switch, complete with slide action.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/introducing-touch-enabled-spincontrol/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emulating iPhone&#8217;s slide-to-unlock</title>
		<link>http://blog.42at.com/emulating-iphones-slide-to-unlock</link>
		<comments>http://blog.42at.com/emulating-iphones-slide-to-unlock#comments</comments>
		<pubDate>Thu, 28 Jan 2010 06:58:42 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=134</guid>
		<description><![CDATA[The touch-enabled sliderControl covered earlier is an easy UI widget to select a value from a set or a range of numbers.  It can be easily modified to function as a slide-to-unlock contorl that you see on the iPhone.  Enter the slideToAction control: mySlider6 = new slideToAction('#slider6', ['slide to unlock'], { onchange: function(){ alert('unlocked'); // [...]]]></description>
			<content:encoded><![CDATA[<p>The touch-enabled sliderControl <a href="http://blog.42at.com/introducing-a-touch-enabled-slider-control">covered earlier</a> is an easy UI widget to select a value from a set or a range of numbers.  It can be easily modified to function as a slide-to-unlock contorl that you see on the iPhone.  Enter the <strong>slideToAction</strong> control:</p>
<pre>mySlider6 = new slideToAction('#slider6', ['slide to unlock'], {
	onchange: function(){
		alert('unlocked'); // some useful action!
	}
});</pre>
<p><strong>Markup:</strong></p>
<pre>&lt;div id="slider6" class="slider"&gt;&lt;/div&gt;</pre>
<p>When the thumnail is moved all the way to the end, the onchange handler gets called.  Simple.  slideToAction inherits all of sliderControl&#8217;s kenetics and emulates the spotlight effect of iPhone&#8217;s control.</p>
<p>slideToAction is included as part of <a href="http://blog.42at.com/slidercontrol/">sliderControl</a>.  See item #6 &#8216;single value slider&#8217; on the <a href="http://42at.com/lab/sliderControl">demo page</a>.</p>
<p><img class="aligncenter size-full wp-image-138" title="slideToAction" src="http://blog.42at.com/wp-content/uploads/2010/01/slideToAction1.png" alt="" width="321" height="62" /></p>
<p>(The thumbnail looks better on the iPhone browser!)</p>
<p>The spotlight effect of the label text is achieved using -webkit-mask-* CSS attribute and animating the  -webkit-mask-position property.  Here&#8217;s the CSS:</p>
<pre>.sliderAction .sliderLabel {
	font-size:18px;
	font-weight:normal;
	text-shadow:none;
	color: #fff;
	-webkit-mask-image: -webkit-gradient(linear, 35% top, 65% top,
           from(rgba(0,0,0,.20)), color-stop(.5,rgba(0,0,0,1)), to(rgba(0,0,0,.20)));
	-webkit-mask-size: 50%;
	-webkit-mask-repeat: none;

	-webkit-animation-name: spotlight;
	-webkit-animation-timing-function: linear;
	-webkit-animation-duration: 1500ms;
	-webkit-animation-iteration-count: infinite;
}</pre>
<p>using the animation keyframes:</p>
<pre>@-webkit-keyframes spotlight {
    from {-webkit-mask-position: 0;}
    to {-webkit-mask-position: 100%;}
}</pre>
<p>The  -webkit-mask-position property is animated on desktop Safari 4.x and Chrome 4.x.   It isn’t supported on iPhone OS 3.1.2 browser&#8230; but hopefully it will under 3.2.</p>
<p><strong>Update: </strong>(11 March 2010)</p>
<p>New version 0.1a has an updated slideToAction() that looks more like the real thing.  Here&#8217;s a screenshot.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-167" title="slideToAction - version 0.1a" src="http://blog.42at.com/wp-content/uploads/2010/01/slideToAction1a1.png" alt="" width="368" height="74" /></p>
<p style="text-align: left;">Seems like SDK developers have been trying to get this feature implemented as well.  See <a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/11470-there-way-i-can-use-slide-unlock-slider.html">here</a> and <a href="http://stackoverflow.com/questions/438046/iphone-slide-to-unlock-animation">here</a>.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;">http://blog.42at.com/introducing-a-touch-enabled-slider-control</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/emulating-iphones-slide-to-unlock/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing a touch-enabled slider control</title>
		<link>http://blog.42at.com/introducing-a-touch-enabled-slider-control</link>
		<comments>http://blog.42at.com/introducing-a-touch-enabled-slider-control#comments</comments>
		<pubDate>Fri, 22 Jan 2010 19:39:26 +0000</pubDate>
		<dc:creator>Moos</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://blog.42at.com/?p=97</guid>
		<description><![CDATA[I needed a touch-enabled slider input control for a project I was working on.  Unfortunately there was no good existing solution, so I rolled my own. Features: kinetic snap to value optimized CSS animation full range of slider values supported customizable with extensive options fully programmable event callbacks adjusts on orientation change works on desktop [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.42at.com/wp-content/uploads/2010/01/slider1.png"></a><a href="http://blog.42at.com/slidercontrol/"><img class="alignright size-medium wp-image-132" title="slider1" src="http://blog.42at.com/wp-content/uploads/2010/01/slider1-146x300.png" alt="" width="146" height="300" /></a></p>
<p>I needed a touch-enabled slider input control for a project I was working on.  Unfortunately there was no good existing solution, so I rolled my own.</p>
<h2>Features:</h2>
<ul>
<li>kinetic snap to value</li>
<li>optimized CSS animation</li>
<li>full range of slider values supported</li>
<li>customizable with extensive options</li>
<li>fully programmable</li>
<li>event callbacks</li>
<li>adjusts on orientation change</li>
<li>works on desktop webkit browsers (for testing)</li>
<li>theme to taste!</li>
</ul>
<p>See <a href="http://blog.42at.com/slidercontrol/">sliderControl page</a> for details.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.42at.com/introducing-a-touch-enabled-slider-control/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

