<?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>Claudio&#039;s Hideout &#187; jquery</title>
	<atom:link href="http://claudio.cicali.name/post/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://claudio.cicali.name</link>
	<description>Claudio Cicali web hub</description>
	<lastBuildDate>Wed, 08 Sep 2010 07:45:43 +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>Mio screencast su Thinkcode.tv</title>
		<link>http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/</link>
		<comments>http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 09:28:12 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Annunci]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[lezione]]></category>
		<category><![CDATA[promozione]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[thinkcode]]></category>

		<guid isPermaLink="false">http://claudio.cicali.name/?p=718</guid>
		<description><![CDATA[È online da qualche giorno il mio primo screencast pubblicato per thinkcode.tv. L&#8217;argomento è jQuery e nella lezioncina di un&#8217;oretta cerco di affrontare la maggior parte dei temi che possono interessare chi si avvicina per la prima volta a questa libreria. Sul sito è disponibile una preview di 5 minuti (presa circa ad un terzo &#8230; <span class='readmore'>[<a href='http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/'>continua &#187;</a>]</span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://thinkcode.tv"><img class="alignleft size-medium wp-image-720" title="thinkcode" src="http://claudio.cicali.name/wp-content/uploads/2010/02/thinkcode1-300x116.gif" alt="" width="300" height="116" /></a>È online da qualche giorno il mio <a href="http://it.thinkcode.tv/catalogo/introduzione-a-jquery/">primo screencast</a> pubblicato per <a href="http://it.thinkcode.tv">thinkcode.tv</a>. L&#8217;argomento è jQuery e nella lezioncina di un&#8217;oretta cerco di affrontare la maggior parte dei temi che possono interessare chi si avvicina per la prima volta a questa libreria. Sul sito è disponibile una preview di 5 minuti (presa circa ad un terzo della lunghezza totale del video).</p>
<p>Voglio ringraziare thinkcode per l&#8217;opportunità offertami e spero davvero di poter collaborare ancora con loro :)</p>
<blockquote><div>
jQuery sta rapidamente diventando la libreria JavaScript più usata al mondo, per lo sviluppo di applicazioni web interattive e dinamiche. In questo screencast di poco più di un&#8217;ora, Claudio Cicali ci guida nell&#8217;apprendimento dei concetti di base, mostrando il come e il perché dell&#8217;uso della libreria, a partire dalla sua storia, per finire a parlare delle best practice, passando per la manipolazione del DOM, la gestione degli eventi e Ajax. Si tratta di uno screencast indispensabile per lo sviluppatore moderno.
</div>
</blockquote>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/&amp;title=Mio+screencast+su+Thinkcode.tv" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/&amp;title=Mio+screencast+su+Thinkcode.tv" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Mio+screencast+su+Thinkcode.tv+-+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/&amp;t=Mio+screencast+su+Thinkcode.tv" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Mio+screencast+su+Thinkcode.tv&amp;link=http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fclaudio.cicali.name%2Fpost%2F2010%2F02%2Fmio-screencast-su-thinkcode-tv%2F&amp;t=Mio+screencast+su+Thinkcode.tv" rel="nofollow" class="external" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://claudio.cicali.name/post/2010/02/mio-screencast-su-thinkcode-tv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery vs document.getElementById</title>
		<link>http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/</link>
		<comments>http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/#comments</comments>
		<pubDate>Sun, 03 Jan 2010 16:55:30 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Articoli]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://claudio.cicali.name/?p=601</guid>
		<description><![CDATA[With the first post of the year, I&#8217;d like to present the results of a (very) simple and unreliable performance benchmark.
The question I would like to give an answer to was: giving the selector of an HTML ID, how much the document.getElementById is faster than the jQuery selection? Well &#8211; as it tourned out &#8211; &#8230; <span class='readmore'>[<a href='http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/'>continua &#187;</a>]</span>]]></description>
			<content:encoded><![CDATA[<p>With the first post of the year, I&#8217;d like to present the results of a (very) simple and unreliable performance benchmark.</p>
<p>The question I would like to give an answer to was: giving the selector of an HTML ID, how much the document.getElementById is faster than the jQuery selection? Well &#8211; as it tourned out &#8211; it is astonishingly faster.</p>
<p>The test run over 100000 calls to the same minimal function and then collect the result in millisecond. For each test, 8 runs were made and the greatest and lowest value were dropped before the average time was computed. Every test was ran against Firefox 3.5.6, Firefox 3.6b5, Chrome 4, Safari 4, IE 8 and Opera 10.10.</p>
<p>&#8220;Why don&#8217;t run the test also against the soon to be released jQuery 1.4.0?&#8221;, I asked myself. So I did.</p>
<p>The test code itself goes along these lines:</p>
<pre class="brush: jscript;">
function benchmark(f, result) {
  var start = new Date();
  f();
  var stop = new Date();
  document.getElementById(result).innerHTML = stop - start;
}

$(&quot;#start&quot;).click(function() {
    benchmark(function() {
      var e;
      for(n=0; n &lt; 100000; n++) {
        e = $('#testID');
// or  e = document.getElementById('#testID');
      }
    }, &quot;result&quot;);
    return false;
});
</pre>
<p>And here comes the whole picture:</p>
<p style="text-align: center;"><a href="http://claudio.cicali.name/wp-content/uploads/2010/01/jqueryspeed.jpg"><img class="aligncenter size-medium wp-image-602" title="jqueryspeed" src="http://claudio.cicali.name/wp-content/uploads/2010/01/jqueryspeed.jpg" alt="" /></a></p>
<p style="text-align: left;">What did I learn?</p>
<ul>
<li>when possible, use the document.getElementById() native function (or a simple helper wrapper) instead of the jQuery method</li>
<li>IE and Firefox 3.5 are embarassingly slow</li>
<li>Chrome and Safari are embarassingly fast</li>
<li>Firefox 3.6 is gaining a lot of performance points, but still&#8230;</li>
<li>Opera 10.10 is good, but the gEBI performances are very bad</li>
<li>Chrome is loosing something with jQuery 1.4. Well, it seems so. I don&#8217;t think this is real.</li>
<li>The best performance gain with jQuery 1.4 would be for IE8</li>
</ul>
<p>Remember that this test is extremely unreliable and of indicative quality only. Do not take any assumption for granted :)</p>
<p><strong>ADDENDUM</strong>: as a follow up to a <a href="http://friendfeed.com/caludio/ef460e48/jquery-vs-document-getelementbyid">discussion on Friendfeed</a>, I ran one more test. This time I&#8217;ve used a wrapper like this one:</p>
<pre class="brush: jscript;">

function $getId(id) {
  $(document.getElementById(id));
}

$(&quot;#startWRAPPER&quot;).click(function() {
    benchmark(function() {
      var e;
      for(n=0; n &lt; 100000; n++) {
        e = $getId('testID');
      }
    }, &quot;result&quot;);
    return false;
});
</pre>
<p>When you need an ID, as a jQuery object, using the wrapper can certainly give you same benefits. The test has been ran with the latest jQuery 1.4 version.</p>
<p><a href="http://claudio.cicali.name/wp-content/uploads/2010/01/jqueryspeed22.jpg"><img class="aligncenter size-full wp-image-613" title="jqueryspeed2" src="http://claudio.cicali.name/wp-content/uploads/2010/01/jqueryspeed22.jpg" alt="" width="428" height="168" /></a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/&amp;title=jQuery+vs+document.getElementById" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/&amp;title=jQuery+vs+document.getElementById" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=jQuery+vs+document.getElementById+-+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/&amp;t=jQuery+vs+document.getElementById" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.friendfeed.com/share?title=jQuery+vs+document.getElementById&amp;link=http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fclaudio.cicali.name%2Fpost%2F2010%2F01%2Fjquery-vs-document-getelementbyid%2F&amp;t=jQuery+vs+document.getElementById" rel="nofollow" class="external" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://claudio.cicali.name/post/2010/01/jquery-vs-document-getelementbyid/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Lisearch: un plugin jquery per una diversa usabilità delle form di ricerca</title>
		<link>http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/</link>
		<comments>http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 18:32:36 +0000</pubDate>
		<dc:creator>claudio</dc:creator>
				<category><![CDATA[Annunci]]></category>
		<category><![CDATA[Programmazione]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[hth]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://claudio.cicali.name/?p=369</guid>
		<description><![CDATA[Ammetto che trovare il titolo mi è costato quasi di più che scrivere il plugin; comunque: questo plugin per jQuery permette di trasformare una form di ricerca (o qualsiasi altra form simile) in modo da renderla di più immediato ed agile utilizzo secondo un paradigma che, lo ammetto, mi sono un po' inventato io.]]></description>
			<content:encoded><![CDATA[<p>Ammetto che trovare il titolo mi è costato quasi di più che scrivere il plugin; comunque: questo plugin per jQuery permette di trasformare una form di ricerca (o qualsiasi altra form simile) in modo da renderla di più immediato ed agile utilizzo secondo un paradigma che, lo ammetto, mi sono un po&#8217; inventato io.</p>
<p>Il sistema parte dal presupposto che una form da modificare sia composta da:</p>
<ul>
<li>un campo di testo</li>
<li>una lista di opzioni entro le quali cercare (devono essere <strong>radio button</strong>)</li>
<li>un tasto di invio.</li>
</ul>
<p>L&#8217;utente, normalmente, scrive il testo da cercare, seleziona tramite radio button dove vuole effettuare la ricerca (lo <em>scope</em> della stessa) e preme il pulsante. Questo plugin trasforma i radio button in una lista che apparirà direttamente sotto il campo di ricerca non appena il campo di input prenderà il focus. Una volta scritto il testo da cercare, l&#8217;utente potrà cliccare direttamente lo scope dentro la lista per effettuare la ricerca. Il plugin crea la lista in modo da essere anche navigabile da tastiera, tramite tab, in quanto tutti gli item sono costituiti da elementi A; così, per una massima velocità di utilizzo, si scrive il testo da cercare, si preme tab e poi invio.</p>
<p>Un paio di immagini dovrebbero chiarire meglio il concetto.</p>
<p>Questa è la form di &#8220;partenza&#8221;, senza il plugin attivo:</p>
<p><img class="aligncenter size-full wp-image-370" title="lisearch0" src="http://claudio.cicali.name/wp-content/uploads/2009/03/lisearch0.png" alt="lisearch0" width="382" height="140" />Una volta attivato il plugin, la form viene &#8220;collassata&#8221; in questa:</p>
<p><img class="aligncenter size-full wp-image-371" title="lisearch1" src="http://claudio.cicali.name/wp-content/uploads/2009/03/lisearch1.png" alt="lisearch1" width="389" height="100" />Una volta che il cursore di sia portato nel campo di ricerca, ecco cosa succederà:</p>
<p><img class="aligncenter size-full wp-image-372" title="lisearch2" src="http://claudio.cicali.name/wp-content/uploads/2009/03/lisearch2.png" alt="lisearch2" width="383" height="155" /></p>
<p>I radio button sono stati trasformati in una pseudo select box a discesa, navigabile tramite tab o mouse (non sono attivi i tasti cursore, perché l&#8217;impegno necessario è forse troppo rispetto all&#8217;effettiva utilità del plugin).</p>
<p>La form di esempio è questa; si può osservare come si usa il plugin:</p>
<pre>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;/title&gt;
&lt;link rel="stylesheet" href="lisearch.css"&gt;
&lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="lisearch.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(function() {
  $('.scopes').lisearch();
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form&gt;
  &lt;ul&gt;
    &lt;li&gt;
      &lt;label&gt;Frase da cercare&lt;/label&gt;
      &lt;input type="text" id="q" name="q"&gt;
    &lt;/li&gt;
    &lt;li id="scopes" class="scopes"&gt;
      &lt;input type="radio" name="scope" value="italia"&gt;&lt;label&gt;In italia&lt;/label&gt;
      &lt;input type="radio" name="scope" value="europa"&gt;&lt;label&gt;In europa&lt;/label&gt;
      &lt;input type="radio" name="scope" value="mondo"&gt;&lt;label&gt;Nel mondo&lt;/label&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;input type="submit" value="Cerca"&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Insieme al plugin viene fornito un file CSS minimale che può servire per capire meglio gli elementi che vengono creati e dunque per poterli stilare. Ovviamente niente può sostituire Firebug, in questo contesto.</p>
<p>I test di funzionamento sono stati effettuati con jQuery 1.3.2 (l&#8217;ultimissima versione al momento in cui scrivo), ma credo che possa funzionare anche con versioni più vecchie.</p>
<p><a href="http://web20.it/misc/lisearch/lisearch.tar.gz">Scarica il plugin</a> oppure <a href="http://web20.it/misc/lisearch">prova una demo</a></p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
		<li class="shr-comfeed">
			<a href="http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/&amp;title=Lisearch%3A+un+plugin+jquery+per+una+diversa+usabilit%C3%A0+delle+form+di+ricerca" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/&amp;title=Lisearch%3A+un+plugin+jquery+per+una+diversa+usabilit%C3%A0+delle+form+di+ricerca" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Lisearch%3A+un+plugin+jquery+per+una+diversa+usabilit%C3%A0+delle+form+di+ricerca+-+&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/&amp;t=Lisearch%3A+un+plugin+jquery+per+una+diversa+usabilit%C3%A0+delle+form+di+ricerca" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Lisearch%3A+un+plugin+jquery+per+una+diversa+usabilit%C3%A0+delle+form+di+ricerca&amp;link=http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/" rel="nofollow" class="external" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="shr-tumblr">
			<a href="http://www.tumblr.com/share?v=3&amp;u=http%3A%2F%2Fclaudio.cicali.name%2Fpost%2F2009%2F03%2Flisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca%2F&amp;t=Lisearch%3A+un+plugin+jquery+per+una+diversa+usabilit%C3%A0+delle+form+di+ricerca" rel="nofollow" class="external" title="Share this on Tumblr">Share this on Tumblr</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://claudio.cicali.name/post/2009/03/lisearch-un-plugin-jquery-per-una-diversa-usabilita-delle-form-di-ricerca/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->