<?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>Altryne's Blog &#187; JS</title> <atom:link href="http://alexw.me/tags/js/feed/" rel="self" type="application/rss+xml" /><link>http://alexw.me</link> <description>Not everyday I get to learn "nothing"</description> <lastBuildDate>Sat, 28 May 2011 20:29:51 +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>iPad simulator in HTML and JS</title><link>http://alexw.me/2011/01/ipad-simulator-in-html-and-js/</link> <comments>http://alexw.me/2011/01/ipad-simulator-in-html-and-js/#comments</comments> <pubDate>Mon, 10 Jan 2011 18:55:12 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Personal]]></category> <category><![CDATA[Playing with stuff]]></category> <category><![CDATA[Amazing]]></category> <category><![CDATA[css3]]></category> <category><![CDATA[html]]></category> <category><![CDATA[ios]]></category> <category><![CDATA[ipad]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[JS]]></category> <guid
isPermaLink="false">http://alexw.me/?p=270</guid> <description><![CDATA[Let me tell you what a crazy week it&#8217;s been regarding my iPad Simulator A little background I&#8217;ve thought about creating the iPad simulator shortly after I bought my iPad. I was fascinated by the UI and wanted to see if I can recreate it. This isn&#8217;t the first online simulator I&#8217;ve built, before this, was a Nokia n97 [...]]]></description> <content:encoded><![CDATA[<p><strong><span
style="font-size: small;">Let me tell you what a crazy week it&#8217;s been regarding my <a
href="http://alexw.me/ipad">iPad Simulator</a></span></strong></p><p><span
style="font-size: medium;"><strong>A little background</strong></span></p><p>I&#8217;ve thought about creating the iPad simulator shortly after I bought my iPad. I was fascinated by the UI and wanted to see if I can recreate it.</p><p>This isn&#8217;t the first online simulator I&#8217;ve built, before this, was a Nokia n97 simulator, also built with JS + CSS  (<a
href="http://nokian97.co.il">http://nokian97.co.il</a>)</p><p>I&#8217;ve uploaded the iPad simulator a while ago, started playing with it, adding apps  (google maps, safari, photos etc&#8217;) , and I was getting 5 hits daily (most of them me from work)</p><p
style="text-align: center;"><a
href="http://alexw.me/ipad" target="_blank"><img
class="size-large  aligncenter" title="iPad Simulator with html + css + javascript (jQuery)" src="http://alexw.me/wp-content/uploads/2011/01/09-ipad_simulator-1024x869.png" alt="iPad Simulator with html + css + javascript (jQuery)" width="614" height="521" /></a></p><p><strong><span
style="font-size: medium;">Forrst</span></strong></p><p>I joined <a
href="http://forrst.com">Forrst </a>and decided to share it with the forrsters , and I got amazing feedback. And people there told me they want to hack on it, so I&#8217;ve released the code on <a
href="https://github.com/altryne/Ipad-Simulator">github</a>.</p><p><strong><span
style="font-size: medium;">W3c Israel</span></strong></p><p>Some weeks after, I went to a W3C Israel meeting on web app development and after a short hackaton (results of which you can see  <a
href="http://reallygood.co.il/jokes">here</a> and fork on <a
href="https://github.com/RonnyO/Really-Good-Jokes">github</a> ) I&#8217;ve showed the guys there the iPad simulator among other things. They told me I have to publish it somewhere. I&#8217;ve sent an email to ajaxians@ajaxian.com and went to sleep.</p><p><strong><span
style="font-size: medium;">Morning After</span></strong></p><p>I wake up, and I see that someone mentioned me on twitter (I&#8217;m <a
href="http://twitter.com/altryne">@altryne</a>) and he talked about my iPad simulator. I went and checked google analytics and I was amazed to see that while I was sleeping more then 2000 unique hits arrived at my site.</p><p><strong><span
style="font-size: medium;">Twitter</span></strong></p><p>Turns out my site was a hit on twitter, with guys like <strong>Dylan Schiemann</strong> (<a
title="Dylan Schiemann" href="http://twitter.com/#%21/dylans">@dylans</a>), <strong>Jesse Newhart</strong> (<a
href="http://twitter.com/JesseNewhart">@JesseNewhart</a>),<strong>Dion Almaer (</strong><a
href="http://twitter.com/dalmaer">@dalmaer</a>),<strong>Cameron Moll</strong> (<a
href="http://twitter.com/cameronmoll">@cameronmoll</a>) and a <a
href="http://topsy.com/alexw.me/ipad/?infonly=1&amp;sort_method=influence">lot more</a> &#8211; thanx a lot guys <img
src='http://alexw.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I&#8217;m glad you like it.</p><p><strong><span
style="font-size: medium;">Websites and blogs</span></strong></p><p>Like I said, I never expected this kind of embrace by the community, and I certainly was surprised to see my link in <a
href="http://www.guardian.co.uk/media/blog/2011/jan/04/technology-links-newsbucket1">the guardian tech blog</a> and on <a
href="http://developer.yahoo.com/blogs/ydn/posts/2010/04/tech_thursday_ipad_simulator_twitter_archives_html5_tester_and_filling_blank_maps/">Developer.Yahoo.com tech blog</a> and I was proud.</p><p>Also I was featured on <a
href="http://habrahabr.ru/blogs/webdev/111299">habrahabr.ru</a> , <a
href="http://www.techweb.com.cn/newsite/2011-01-06/735371.shtml">techweb.com.cn</a>, <a
href="http://news.ycombinator.com/item?id=2065250">Ycombinator</a>, <a
href="http://macmagazine.com.br/2011/01/09/rapidinhas-do-mm-ipad-simulator-recall-do-wakemate-atraso-do-light-peak-e-mais/">macmagazine.com.br</a> and event 1 <a
href="http://www.youtube.com/watch?v=Y5BVVbC73Ws" rel="shadowbox[post-270];player=swf;width=640;height=385;">youtube video!</a></p><p><span
style="font-size: medium;"><strong>What&#8217;s next?</strong></span></p><p><span
style="font-size: small;">Well I read all the comments I could find, including the trolling and I have a ton of stuff to do. </span></p><p><span
style="font-size: small;">One thing I was thinking about, is showing a web demo of some iPad applications, and ask developers to provides those demo&#8217;s, because screenshots are too static <img
src='http://alexw.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p><p><span
style="font-size: small;">If your&#8217;e an iPad app developer and want to see your app in the simulator, contact me : alex [at]  alexw.me</span></p><p><span
style="font-size: small;">I&#8217;m also gonna finish my photos app and it&#8217;s gonna be awesome! Stay tuned.</span></p><p><span
style="font-size: small;"><br
/> </span></p> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2011/01/ipad-simulator-in-html-and-js/feed/</wfw:commentRss> <slash:comments>105</slash:comments> </item> <item><title>Garbage collecting in IE with ajax heavy applicaitons</title><link>http://alexw.me/2010/12/garbage-collecting-in-ie-with-ajax-heavy-applicaitons/</link> <comments>http://alexw.me/2010/12/garbage-collecting-in-ie-with-ajax-heavy-applicaitons/#comments</comments> <pubDate>Sun, 05 Dec 2010 16:44:09 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Personal]]></category> <category><![CDATA[garbage collecting]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[JS]]></category> <category><![CDATA[optimization]]></category> <guid
isPermaLink="false">http://alexw.me/?p=233</guid> <description><![CDATA[We have a very heavy Ajax application on one of our sites. It reloads block of html on the site every 5 seconds or every user click, so obviously it&#8217;s intense. I was approached by our QA and he told me that he&#8217;s computer freezes after some time the site is running. And I started [...]]]></description> <content:encoded><![CDATA[<div><p>We have a very heavy Ajax application on one of our sites. It reloads block of html on the site every 5 seconds or every user click, so obviously it&#8217;s intense.</p><p>I was approached by our QA and he told me that he&#8217;s computer freezes after some time the site is running.</p><p>And I started to investigate. Turns out we haven&#8217;t been collecting our garbage ourselves, and the &#8220;good&#8221; browsers took care of that for us.</p><p>Not IE though. IE was stuck after some 5-6 requests, and would just come to a halt on page.unload()</p><p>Manual garbage collecting to the rescue.</p><pre class="brush: javascript">
_temp = $.ajax(/* get loads of html data from ajax here*/);
_temp = _temp.replace(/*apply needed transformations before outputing code to the page*/)
$(&#039;#updated_div&#039;).html(_temp);
//garbage collecting - very important
delete _temp;
</pre><p>As you can see, one small line of code can help so much to your heavy Ajax application in browsers like IE.</p></div> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2010/12/garbage-collecting-in-ie-with-ajax-heavy-applicaitons/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Simlest jquery rounded tabs with some css3</title><link>http://alexw.me/2010/02/simle-jquery-rounded-tabs/</link> <comments>http://alexw.me/2010/02/simle-jquery-rounded-tabs/#comments</comments> <pubDate>Thu, 25 Feb 2010 21:05:53 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Playing with stuff]]></category> <category><![CDATA[Css]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[jQuery]]></category> <category><![CDATA[JS]]></category> <category><![CDATA[xHtml]]></category> <guid
isPermaLink="false">http://alexw.me/?p=176</guid> <description><![CDATA[This is a solution for tabbed interface I wrote while working on a high profile project at work. It uses jQuery and about 3 lines of code to create it(plus some css+xtml). Very easy indeed. I know there are a LOT of tab plugins avaliable out-there, I used them myself. A lot. The problem was, [...]]]></description> <content:encoded><![CDATA[<p>This is a solution for tabbed interface I wrote while working on a high profile project at work. It uses jQuery and about 3 lines of code to create it(plus some css+xtml). Very easy indeed.<br
/> I know there are a LOT of <a
title="simple tabs with jquery" href="http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/" target="_blank">tab</a> <a
title="jQuery ui tabs" href="http://docs.jquery.com/UI/Tabs" target="_blank">plugins</a> <a
title="Tabs using animation effects" href="http://stilbuero.de/jquery/tabs/" target="_blank">avaliable</a> out-there, I used them myself. A lot.<br
/> The problem was, I wanted a quick solution, without the bells and whiles of animation and FX. This is what came out.</p><p><a
href="http://alexw.me/playground/tabs.html">SEE DEMO HERE<br
/> </a></p><p><strong><span
style="font-size: medium;">Step one : xHtml markup</span></strong></p><p><strong><span
style="font-size: medium;"><span
id="more-176"></span><br
/> </span></strong></p><p>I decided to use the most basic structure. 2 wrappers next to each other, one containing the actual tabs, the other the relative content to each tab. Both elements(tabs and content) receive the &#8216;active&#8217; class when their are in fact <strong>active</strong>.</p><pre class="brush: html">
&lt;ul id=&quot;tabz&quot;&gt;
&lt;li class=&quot;tab active&quot;&gt;Tab1&lt;/li&gt;
&lt;li class=&quot;tab &quot;&gt;Tab2&lt;/li&gt;
&lt;li class=&quot;tab &quot;&gt;Tab3&lt;/li&gt;
&lt;/ul&gt;
&lt;div id=&quot;tabz_cont&quot;&gt;
&lt;div class=&quot;cont active&quot;&gt;Content 1&lt;/div&gt;
&lt;div class=&quot;cont&quot;&gt;Content 2&lt;/div&gt;
&lt;div class=&quot;cont&quot;&gt;
&lt;h1&gt;some other content&lt;/h1&gt;
Content 1
&lt;/div&gt;
&lt;/div&gt;
</pre><p><strong><span
style="font-size: medium;">Step two : Css</span></strong></p><p><span>I used a grid system (<a
href="http://960.gs)">http://960.gs)</a> to position and give widths to all the elements, beside that, I used some css3 techniques to beatify my tabs (rounded corners and shadow).</span><br
/> The actual css you use, isn&#8217;t important to the work of the <strong>tabz</strong>.</p><p><span
style="font-size: large;"><strong>Step three : JAVASCRIPT</strong></span></p><p>This is the reason why you are reading this, right? here you go:</p><pre class="brush: js">
//Tabz code - apply event to the tabs elements and your done
$(&#039;#tabz li&#039;).live(&#039;click&#039;,function(){
_index = $(this).parent().children().index($(this));
$(this).addClass(&#039;active&#039;).siblings().removeClass(&#039;active&#039;);
$(&#039;.cont&#039;).removeClass(&#039;active&#039;).eq(_index).addClass(&#039;active&#039;);
});
</pre><p>I select the tabs and assign them a click event listener, with the <strong>live()</strong> function.</p><p>Then I create an <strong>_index</strong> variable, that will tel me the index of the tab inside it&#8217;s parent.</p><p>By this <strong>_index</strong> I can now show the relevant content in the content div(the tabs and their content <strong>have </strong> to be the same index in their respective containers)</p><p>That&#8217;s it. Hope you can use this. If you do, don&#8217;t forget to comment here and show me your work.</p> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2010/02/simle-jquery-rounded-tabs/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Flash to Javascript (mootools) ?</title><link>http://alexw.me/2009/02/flash-to-javascript-mootools/</link> <comments>http://alexw.me/2009/02/flash-to-javascript-mootools/#comments</comments> <pubDate>Tue, 17 Feb 2009 21:29:19 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Playing with stuff]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[JS]]></category> <category><![CDATA[Mootools]]></category> <category><![CDATA[Personal]]></category> <category><![CDATA[xHtml]]></category> <guid
isPermaLink="false">http://alexw.me/?p=53</guid> <description><![CDATA[Ok, so if you still haven&#8217;t checked my &#8220;flash site&#8221; yet, you really should. I&#8217;s a consept website, in flash, I created some time ago and didn&#8217;t finish. It has a couple if nifty things to play with (draggable birds, media buttons in form of floating balloons,a very unique panoramic background) And I decided to [...]]]></description> <content:encoded><![CDATA[<p>Ok, so if you still haven&#8217;t checked my &#8220;<a
title="Go to my flash website" href="http://alexw.me/flash/">flash site</a>&#8221; yet, you really should.</p><p>I&#8217;s a consept website, in flash, I created some time ago and didn&#8217;t finish.</p><p>It has a couple if nifty things to play with (draggable birds, media buttons in form of floating balloons,a very unique panoramic background)</p><p>And I decided to port this whole thing into JS with MooTools and it&#8217;s FX.Scroll function.</p><p>So in the next couple of days I will be posting the results here and the code also.</p><p>Cheerz</p> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2009/02/flash-to-javascript-mootools/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Ok, So I opened a new blog</title><link>http://alexw.me/2009/02/first-post/</link> <comments>http://alexw.me/2009/02/first-post/#comments</comments> <pubDate>Tue, 10 Feb 2009 19:50:08 +0000</pubDate> <dc:creator>Altryne</dc:creator> <category><![CDATA[Personal]]></category> <category><![CDATA[Css]]></category> <category><![CDATA[JS]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[xHtml]]></category> <guid
isPermaLink="false">http:/?p=1</guid> <description><![CDATA[Hi everybody, I opened this blog, to share my thoughts on different things I come accross in my field. I&#8217;m a web-designer and web-developer for a year now. I do mostly PHP and JavaScript (usually mootools), also I really love everything that has to with mark-up (xHTML and CSS) Everyday I learn something new, and [...]]]></description> <content:encoded><![CDATA[<p>Hi everybody,</p><p>I opened this blog, to share my thoughts on different things I come accross in my field.</p><p>I&#8217;m a web-designer and web-developer for a year now.</p><p>I do mostly <strong>PHP </strong>and <strong>JavaScript</strong> (usually <strong>mootools</strong>), also I really love everything that has to with mark-up (<strong>xHTML </strong>and <strong>CSS</strong>)</p><p>Everyday I learn something new, and this will be the place to share my newly acquired knowledge.</p> ]]></content:encoded> <wfw:commentRss>http://alexw.me/2009/02/first-post/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
