<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8640596986273216089</id><updated>2025-12-18T21:15:46.648-03:00</updated><category term="jQuery"/><category term="Javascript"/><category term="jQuery.ScrollTo"/><category term="jQuery.LocalScroll"/><category term="jQuery.SerialScroll"/><category term="jQuery.Rule"/><category term="Maxthon"/><category term="jQuery.Listen"/><category term="jQuery.Accessible"/><category term="jQuery.AjaxFilter"/><category term="jQuery.Bubble"/><category term="jQuery.Collection"/><category term="jQuery.Preload"/><category term="jQuery.ScrollShow"/><category term="jQuery.XHR"/><title type='text'>Ariel Flesler</title><subtitle type='html'>My jQuery plugins, and other scripts.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>44</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-2172144923434835015</id><published>2014-07-27T15:47:00.001-03:00</published><updated>2014-07-27T15:47:30.311-03:00</updated><title type='text'>This blog is oficially closed</title><content type='html'>&lt;h4&gt;This blog is officially closed&lt;/h4&gt;&lt;br /&gt;
It&#39;s been quite some years since I last posted on this blog. At some point the amount of daily inquires in the comments became overwhelming for the time I had available so I locked them.&lt;br /&gt;
&lt;br /&gt;
If someone has a doubt or an issue with a plugin I&#39;d advice you to ask on sites like StackOverflow.&lt;br /&gt;
If you think you found a bug or have a feature request feel free to create an issue on the appropriate project on &lt;a href=&quot;https://github.com/flesler/&quot;&gt;Github&lt;/a&gt;. I try to reply fast but there&#39;s no guarantee.</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/2172144923434835015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/2172144923434835015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/2172144923434835015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/2172144923434835015'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2014/07/this-blog-is-oficially-closed.html' title='This blog is oficially closed'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-6421971799272108495</id><published>2009-06-14T13:47:00.003-03:00</published><updated>2012-09-13T12:32:01.104-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.SerialScroll"/><title type='text'>jQuery.SerialScroll 1.2.2 released</title><content type='html'>&lt;h4&gt;Enhancements&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Removed the check that avoids re-scrolling to the same index, this might be desirable sometimes.&lt;/li&gt;
&lt;li&gt;The settings object is exposed in the onBefore as the this.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://flesler.blogspot.com/2008/02/jqueryserialscroll.html&quot;&gt;Main Post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.serialScroll&quot; target=&quot;_blank&quot;&gt;Github Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/serialScroll/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.blogspot.com/2007/10/jqueryscrollto.html&quot;&gt;jQuery.ScrollTo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollTo/&quot; target=&quot;_blank&quot;&gt;jQuery.ScrollTo&#39;s demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/serialScroll/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.serialScroll-1.2.2.js&quot;&gt;jQuery.SerialScroll 1.2.2 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.serialScroll-1.2.2-min.js&quot;&gt;jQuery.SerialScroll 1.2.2 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.4.3.1.js&quot;&gt;jQuery.ScrollTo 1.4.3.1 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.4.3.1-min.js&quot;&gt;jQuery.ScrollTo 1.4.3.1 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/6421971799272108495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/6421971799272108495' title='53 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6421971799272108495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6421971799272108495'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2009/06/jqueryserialscroll-122-released.html' title='jQuery.SerialScroll 1.2.2 released'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>53</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-8172966317998441489</id><published>2009-06-06T21:13:00.003-03:00</published><updated>2009-06-06T21:29:27.867-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>Moving my plugins to Google Code</title><content type='html'>&lt;h4&gt;Google Code&lt;/h4&gt;

&lt;p&gt;I decided to move my plugins from my private svn to &lt;a href=&quot;http://code.google.com/hosting/&quot; target=&quot;_blank&quot;&gt;Google Code&lt;/a&gt;. This means the code being developed is now public and can be viewed and reviewed by anyone.&lt;/p&gt;

&lt;p&gt;I&#39;m also trying to automate the building process with a makefile in order to make deploys less tedious (thus more frequent :)).&lt;/p&gt;

&lt;p&gt;Everyone&#39;s invited to check the code, review it, comment and report bugs. The repository has a few plugins that I actually never released. It doesn&#39;t contain non-jQuery scripts yet. I haven&#39;t moved them yet and won&#39;t do yet.&lt;/p&gt;

&lt;br /&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/flesler-plugins/&quot; target=&quot;_blank&quot;&gt;Project Home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://code.google.com/p/flesler-plugins/source/browse/trunk&quot; target=&quot;_blank&quot;&gt;Trunk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/8172966317998441489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/8172966317998441489' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/8172966317998441489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/8172966317998441489'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2009/06/moving-my-plugins-to-google-code.html' title='Moving my plugins to Google Code'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-4298037741414101030</id><published>2009-05-30T17:19:00.009-03:00</published><updated>2009-05-30T18:07:47.146-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.AjaxFilter"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.XHR"/><title type='text'>2 Ajax plugins for jQuery +1.3</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
&lt;p&gt;I never actually posted about 2 tiny plugins I made, once jQuery 1.3 was nearing.&lt;/p&gt;
&lt;p&gt;Both are somehow related, they are related to Ajax (jQuery.ajax) and they provide sort of a manager to allow multiple implementations of the same feature.&lt;/p&gt;
&lt;p&gt;Needless to say, both plugins only work under jQuery 1.3 or higher. The packages(zips) include jQuery 1.2.7pre because that&#39;s the version I used to test them when I made them. You obviously don&#39;t need to use that version.&lt;/p&gt;

&lt;br /&gt;

&lt;h4&gt;XHR&lt;/h4&gt;
&lt;p&gt;Since jQuery 1.3. The default XHR &quot;factory&quot; function can be overriden by passing an &#39;xhr&#39; setting to jQuery.ajax with a new function&lt;/p&gt;

&lt;p&gt;This tiny plugin provides a simple registry for different xhr implementations to co-exist.&lt;/p&gt;

&lt;p&gt;To provide a new implementation, you need to do something like this:
&lt;pre class=&quot;js&quot;&gt;
jQuery.xhr.register( &lt;span class=&quot;string&quot;&gt;&#39;my_xhr&#39;&lt;/span&gt;, &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( settings ){
  &lt;span class=&quot;keyword&quot;&gt;return new&lt;/span&gt; MyXhrImplementation( settings );
});
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;The argument settings is the object passed to jQuery.ajax.&lt;/p&gt;

&lt;p&gt;To use it, you do:
&lt;pre class=&quot;js&quot;&gt;
jQuery.ajax({
    url:&lt;span class=&quot;string&quot;&gt;&#39;...&#39;&lt;/span&gt;,
    transport:&lt;span class=&quot;string&quot;&gt;&#39;my_xhr&#39;&lt;/span&gt;,
    &lt;span class=&quot;comment&quot;&gt;// ...&lt;/span&gt;
});
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;The built-in implementation is used by default (unless it&#39;s overriden with jQuery.ajaxSetup) and it&#39;s called &#39;xhr&#39;.&lt;/p&gt;

&lt;h5&gt;Links &amp; Downloads&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://jquery.com/plugins/project/XHR&quot; target=&quot;_blank&quot;&gt;Project Page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.xhr-1.0.0.zip&quot;&gt;jQuery.XHR 1.0.0 Zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;

&lt;h4&gt;AjaxFilter&lt;/h4&gt;
&lt;p&gt;This plugin lets you store multiple functions to sanitize ajax responses.&lt;/p&gt;

&lt;p&gt;If you want to provide a new implementation, you need to do something like this:
&lt;pre class=&quot;js&quot;&gt;
jQuery.ajaxFilter.register(&lt;span class=&quot;string&quot;&gt;&#39;js_in_href&#39;&lt;/span&gt;,&lt;span class=&quot;string&quot;&gt;&#39;html&#39;&lt;/span&gt;,
 &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( data ){
  &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; data.replace(&lt;span class=&quot;regex&quot;&gt;/href=&quot;javascript:[^&quot;]+&quot;/g&lt;/span&gt;, &lt;span class=&quot;string&quot;&gt;&#39;&#39;&lt;/span&gt;);
});
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;or
&lt;pre class=&quot;js&quot;&gt;
jQuery.ajaxFilter.register(&lt;span class=&quot;string&quot;&gt;&#39;eval&#39;&lt;/span&gt;,&lt;span class=&quot;string&quot;&gt;&#39;script html json&#39;&lt;/span&gt;,
 &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( data ){
   &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; data.replace(&lt;span class=&quot;regex&quot;&gt;/eval\(.+?\);?/g&lt;/span&gt;, &lt;span class=&quot;string&quot;&gt;&#39;&#39;&lt;/span&gt;);
});
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;Arguments for jQuery.ajaxFilter.register() are:&lt;ol&gt;
&lt;li&gt;Name for the filter, used as &#39;filter&#39; when calling jQuery.ajax.&lt;/li&gt;
&lt;li&gt;One or more dataTypes to handle. Can be any combination of ajax, html, json and xml separated by spaces.&lt;/li&gt;
&lt;li&gt;The filter function. Will receive 2 arguments: the data and the type. The &#39;this&#39; will reference the settings object.&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;

&lt;p&gt;To use it, you do:
&lt;pre class=&quot;js&quot;&gt;
jQuery.ajax({
    url:&lt;span class=&quot;string&quot;&gt;&#39;foo.html&#39;&lt;/span&gt;,
    filter:&lt;span class=&quot;string&quot;&gt;&#39;js_in_href&#39;&lt;/span&gt;,
    &lt;span class=&quot;comment&quot;&gt;// ...&lt;/span&gt;
});
&lt;/pre&gt;
&lt;/p&gt;

&lt;p&gt;The filter can also parse the response.&lt;br /&gt;
That means it can (for example) provide an alternative way of eval&#39;ing json. This is specially useful for Adobe AIR apps.
If the filter returns something else than a string, it&#39;s assumed to be the final response.&lt;/p&gt;

&lt;h5&gt;Links &amp; Downloads&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://jquery.com/plugins/project/AjaxFilter&quot; target=&quot;_blank&quot;&gt;Project Page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.ajaxFilter-1.0.1.rar&quot;&gt;jQuery.AjaxFilter 1.0.1 Zip&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/4298037741414101030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/4298037741414101030' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/4298037741414101030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/4298037741414101030'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2009/05/2-ajax-plugins-for-jquery-13.html' title='2 Ajax plugins for jQuery +1.3'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-6072323237597817865</id><published>2009-05-25T16:47:00.002-03:00</published><updated>2014-04-06T23:57:35.773-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.ScrollTo"/><title type='text'>jQuery.ScrollTo 1.4.2 released</title><content type='html'>&lt;h4&gt;Notice&lt;/h4&gt;I&#39;ve pretty much stopped updating this blog, but the plugin development is still on-going. You can find the link to the Github project page at the bottom of the article.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Fixes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Fixing max calculations for regular DOM elements.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The plugin support percentages as target (&#39;50%&#39; or {top:&#39;50%&#39;, left:&#39;45%&#39;}).&lt;/li&gt;
&lt;li&gt;Exposed the max() calculation as $.scrollTo.max.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Enhancements&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Renamed $.fn.scrollable to $.fn._scrollable to avoid conflicts with other plugins.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo/releases&quot; target=&quot;_blank&quot;&gt;Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo&quot; target=&quot;_blank&quot;&gt;Github Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollTo/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo/blob/master/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/6072323237597817865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/6072323237597817865' title='243 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6072323237597817865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6072323237597817865'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2009/05/jqueryscrollto-142-released.html' title='jQuery.ScrollTo 1.4.2 released'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>243</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-8725107896989867168</id><published>2009-03-11T21:12:00.008-02:00</published><updated>2014-04-06T23:59:31.612-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.LocalScroll"/><title type='text'>jQuery.LocalScroll 1.2.7 released</title><content type='html'>&lt;h4&gt;Notice&lt;/h4&gt;I&#39;ve pretty much stopped updating this blog, but the plugin development is still on-going. You can find the link to the Github project page at the bottom of the article.&lt;br /&gt;
&lt;br /&gt;
In this release I cleaned up the code a little and added some features. Also removed a few old (aka deprecated) stuff that were still hanging around.  &lt;h4&gt;Enhancements&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Added some misc enhancements and cleanup the code.&lt;/li&gt;
&lt;li&gt;Updated the plugin to take advantage of recent scrollTo additions.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Changes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The element that triggered the scroll cannot be accessed anymore from within the onBefore, you can bind your own click (or w/e) to them in order to add a class or things like that.&lt;/li&gt;
&lt;li&gt;settings.persistent is no longer supported (was deprecated).&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The set of settings can be accessed from within the onBefore as the &#39;this&#39;.&lt;/li&gt;
&lt;li&gt;The hash (#foo) is set to the URL before scrolling, so the back button works accurately (when scrolling the window).&lt;/li&gt;
&lt;li&gt;The option &#39;hash&#39; doesn&#39;t make the window jump when scrolling overflown elements&lt;/li&gt;
&lt;li&gt;$.localScroll.hash now resets the element scroll to (0,0) by default. You can set the setting &#39;reset&#39; to false to avoid this.&lt;/li&gt;
&lt;/ul&gt;&lt;center&gt;Enjoy!&lt;/center&gt;&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.localScroll/releases&quot; target=&quot;_blank&quot;&gt;Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.localScroll&quot; target=&quot;_blank&quot;&gt;Github Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/localScroll/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.localScroll/blob/master/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/8725107896989867168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/8725107896989867168' title='208 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/8725107896989867168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/8725107896989867168'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2009/03/jquerylocalscroll-127-released.html' title='jQuery.LocalScroll 1.2.7 released'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>208</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-3388009296846798029</id><published>2009-03-09T21:40:00.005-02:00</published><updated>2014-04-06T23:53:44.340-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.ScrollTo"/><title type='text'>jQuery.ScrollTo 1.4.1 released</title><content type='html'>&lt;h4&gt;Fixes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The plugin accepts floating numbers.&lt;/li&gt;
&lt;li&gt;Using jQuery.nodeName where neccessary so that this works on xml+xhtml.&lt;/li&gt;
&lt;li&gt;The max() internal function wasn&#39;t completely accurrate, now it is 98% (except for IE on quirks mode but it&#39;s not too noticeable).&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The target can be &#39;max&#39; to scroll to the end while keeping it elegant.&lt;/li&gt;
&lt;li&gt;The plugin works on quirks mode.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Enhancements&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Default duration is 0 for jquery +1.3. Means sync animations.&lt;/li&gt;
&lt;li&gt;Rewrote $.fn.scrollable() again. The plugin works on all major browsers (FF, IE, Safari, Opera, Chrome), on all versions, compat &amp; quirks modes, even for iframes.&lt;/li&gt;
&lt;li&gt;In addition to window/document, if html or body are received, the plugin will choose the right one.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo/releases&quot; target=&quot;_blank&quot;&gt;Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo&quot; target=&quot;_blank&quot;&gt;Github Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollTo/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo/blob/master/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/3388009296846798029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/3388009296846798029' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/3388009296846798029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/3388009296846798029'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2009/03/jqueryscrollto-141-released.html' title='jQuery.ScrollTo 1.4.1 released'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-4278758922304833516</id><published>2008-11-17T23:28:00.014-02:00</published><updated>2009-10-28T16:44:10.629-03:00</updated><title type='text'>Haskell Functions for Javascript</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;

&lt;p&gt;I&#39;ve been doing a small &lt;a href=&quot;http://haskell.org/&quot; target=&quot;_blank&quot;&gt;Haskell&lt;/a&gt; project for the Uni and got really interested in this language and the &lt;a href=&quot;http://en.wikipedia.org/wiki/Functional_programming&quot; target=&quot;_blank&quot;&gt;Functional paradigm&lt;/a&gt; in general.&lt;/p&gt;

&lt;p&gt;I suddenly felt like porting some of this cool functionality to Javascript.&lt;/p&gt;

&lt;h4&gt;Currying&lt;/h4&gt;

&lt;p&gt;I started by allowing functions to be &lt;a href=&quot;http://en.wikipedia.org/wiki/Currying&quot; target=&quot;_blank&quot;&gt;curried&lt;/a&gt;. &lt;a href=&quot;http://demos.flesler.com/Curry/&quot; target=&quot;_blank&quot;&gt;Here&#39;s a demo&lt;/a&gt; showing the script I made.&lt;/p&gt;

&lt;p&gt;This is quite a fun way of making functions that derive from other functions.&lt;/p&gt;

&lt;h4&gt;Haskell functions&lt;/h4&gt;

&lt;p&gt;I then felt like porting Haskell&#39;s functions. Seemed doable considering Javascript has &lt;a href=&quot;http://en.wikipedia.org/wiki/Higher-order_function&quot; target=&quot;_blank&quot;&gt;Higher Order Functions&lt;/a&gt; and we now can curry them.&lt;/p&gt;

&lt;p&gt;I ported many &lt;a href=&quot;http://www.zvon.org/other/haskell/Outputprelude/index.html&quot; target=&quot;_blank&quot;&gt;Prelude&#39;s methods&lt;/a&gt; as well as &lt;a href=&quot;http://www.zvon.org/other/haskell/Outputchar/index.html&quot; target=&quot;_blank&quot;&gt;Char methods&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;Special features&lt;/h4&gt;

&lt;p&gt;Apart from currying, these functions can also work on strings, the same way as they do for lists (arrays). You don&#39;t need to worry about splitting(before) or joining(after). I added this because that&#39;s how Haskell&#39;s functions work.&lt;/p&gt;

&lt;p&gt;These functions also work on maps/object/associative arrays. This might not be true for some functions where this was too complicated. This was the best adaptation of Haskell&#39;s &lt;a href=&quot;http://en.wikipedia.org/wiki/Tuples&quot; target=&quot;_blank&quot;&gt;Tuples&lt;/a&gt; that I could think of. A couple of functions like fst and snd don&#39;t have a concrete application for now.&lt;/p&gt;

&lt;p&gt;In case I didn&#39;t make myself clear on this one, all the functions I made can be automatically curried. They&#39;re all contained in one namespace, that is, window.hs. I added a method called: hs.global() that will import all the functions to the global namespace. The magic currying function is available as hs.curry.&lt;/p&gt;

&lt;h4&gt;Operators&lt;/h4&gt;

&lt;p&gt;Haskell&#39;s operators are regular functions. I did imitate this adding most operators as methods. The only problem is that to reference them, you need to use something like hs[&#39;+&#39;] instead of hs.+ as one would like.&lt;/p&gt;

&lt;p&gt;To defeat this, I made hs a function, it provides a small shortcut for these cases. As an example: hs[&#39;+&#39;](1,2) == hs(&#39;+&#39;,1,2).&lt;/p&gt;

&lt;p&gt;I think the second option does look better. These functions can also be curried. hs._ will work the same as hs, but inverting the (2) arguments.&lt;/p&gt;

&lt;p&gt;I added the dot operator for &lt;a href=&quot;http://en.wikipedia.org/wiki/Function_composition&quot; target=&quot;_blank&quot;&gt;function composition&lt;/a&gt;, it&#39;s quite a powerful function.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;

&lt;p&gt;That&#39;s it, the script is licensed under BSD, check the demo and play with it!&lt;/p&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/HS/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/hs-1.0.0.js&quot;&gt;HS 1.0.0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/4278758922304833516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/4278758922304833516' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/4278758922304833516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/4278758922304833516'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/11/haskell-functions-for-javascript.html' title='Haskell Functions for Javascript'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-6318036893660414767</id><published>2008-11-03T21:46:00.028-02:00</published><updated>2008-11-06T11:22:07.478-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Fast Trim Function for Javascript</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
&lt;p&gt;Following &lt;a href=&quot;http://blog.stevenlevithan.com/archives/faster-trim-javascript&quot; target=&quot;_blank&quot;&gt;Steven Levithan&#39;s old post&lt;/a&gt; about string trimming.&lt;/p&gt;
&lt;p&gt;I decided to give it another try after my &lt;a href=&quot;http://blog.stevenlevithan.com/archives/faster-trim-javascript#comment-6808&quot;&gt;first proposal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I made a trim version, based on my aforementioned first attempt. It seems to be much faster on any browser and with different (string) lengths and whitespaces.&lt;/p&gt;

&lt;br /&gt;

&lt;h4&gt;First of all...&lt;/h4&gt;
&lt;p&gt;I want to make clear that this version doesn&#39;t trim the exact same characters that other versions do.&lt;/p&gt;
&lt;p&gt;In my first version, I simply tried to improve Steven&#39;s version without really giving it a deep thought.&lt;/p&gt;
&lt;p&gt;This time I thought:&lt;em&gt;Are all those characters really relevant?&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;After thinking about this for a while I decided that, whatever /\s/ matches, should be trimmed.&lt;/p&gt;
&lt;p&gt;Why ? because most major js libraries use the regex version. If their users are content, then those are the needed characters. Also, if my function would actually do better than others, it could go directly to jQuery&#39;s core (there&#39;s a ticket for that).&lt;/p&gt;
&lt;p&gt;So I created a &lt;a href=&quot;http://benchmarker.flesler.com/whitespace-charcodes/run/&quot; target=&quot;_blank&quot;&gt;test page&lt;/a&gt;. The results weren&#39;t equal for all browsers, IE and Safari 3 yielded far less charCodes. I decided these are the ones I want to trim.&lt;/p&gt;

&lt;br /&gt;

&lt;h4&gt;My Trim function&lt;/h4&gt;
&lt;p&gt;So, the basic modification I made to my previous version, was to check whether the charCode is lower than 33 instead of the whole map/object.&lt;/p&gt;
&lt;p&gt;This one takes much less code and is quite faster, I humbly named it &quot;myBestTrim&quot;, here it is:&lt;/p&gt;
&lt;pre class=&quot;js&quot; style=&quot;letter-spacing:-0.05em;&quot;&gt;
&lt;span class=&quot;comment&quot;&gt;// Licensed under BSD&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt; myBestTrim( str ){
&lt;span class=&quot;tab&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; start = &lt;span class=&quot;number&quot;&gt;-1&lt;/span&gt;,
&lt;span class=&quot;tab&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;tab&quot;&gt;&amp;nbsp;&lt;/span&gt;end = str.&lt;span class=&quot;method&quot;&gt;length&lt;/span&gt;;
&lt;span class=&quot;tab&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt;( str.&lt;span class=&quot;method&quot;&gt;charCodeAt&lt;/span&gt;(--end) &amp;lt; &lt;span class=&quot;number&quot;&gt;33&lt;/span&gt; );
&lt;span class=&quot;tab&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;while&lt;/span&gt;( str.&lt;span class=&quot;method&quot;&gt;charCodeAt&lt;/span&gt;(++start) &amp;lt; &lt;span class=&quot;number&quot;&gt;33&lt;/span&gt; );
&lt;span class=&quot;tab&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; str.&lt;span class=&quot;method&quot;&gt;slice&lt;/span&gt;( start, end + &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt; );
};
&lt;/pre&gt;

&lt;br /&gt;

&lt;h4&gt;The Benchmark&lt;/h4&gt;
&lt;p&gt;If you want to try the benchmark, &lt;a href=&quot;http://benchmarker.flesler.com/trim/run/&quot;&gt;get in here&lt;/a&gt;. The number should you care about (in my opinion) is the minimum. That&#39;s probably the one that ran a lower CPU level.&lt;/p&gt;
&lt;p&gt;That test uses a string with 10K characters. Sounds like a lot but this blog&#39;s homepage has 55K of html. As oposed to a regex-based trim, this one should scale pretty well, because it doesn&#39;t need to check all the string.&lt;/p&gt;
&lt;p&gt;That&#39;s actually why I removed any regex-based approach from this test, because they&#39;d take too long.&lt;/p&gt;
&lt;p&gt;If you have Firebug, I&#39;d advice you to &lt;strong&gt;turn it off&lt;/strong&gt; before getting into this test.&lt;/p&gt;
&lt;p&gt;I made a &lt;a href=&quot;http://benchmarker.flesler.com/trim(short)/run/&quot; target=&quot;_blank&quot;&gt;similar test&lt;/a&gt; with small strings. It uses a string of 30 characters with 3 whitespaces on each side. In this case, the difference was smaller but still noticeable.&lt;/p&gt;
&lt;p&gt;The only situation where another function was faster was on IE, with a small string WITH whitespaces. In this situation, jQuery&#39;s trim (the typical regex-based trim) was slightly faster, my trim got 2nd place.&lt;/p&gt;
&lt;p&gt;Most situations don&#39;t really require much trimming and critical situations have very large strings, so I think this function scales well on those 2.&lt;/p&gt;

&lt;br /&gt;

&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;If all goes well, I&#39;ll put this function into jQuery&#39;s core. I&#39;d like though, to get some results from other users, to verify my trim is really fast and effective.&lt;/p&gt;
&lt;p&gt;Here&#39;s the ticket requesting a faster trim for jQuery: &lt;a href=&quot;http://dev.jquery.com/ticket/2279&quot;&gt;#2279&lt;/a&gt;.&lt;/p&gt;

&lt;h5 class=&quot;setting&quot;&gt;11/6/08&lt;/h5&gt;
&lt;span class=&quot;small&quot;&gt;Removed a dispensable check, thanks Andrea Giammarchi.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/6318036893660414767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/6318036893660414767' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6318036893660414767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6318036893660414767'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html' title='Fast Trim Function for Javascript'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-6162029551504609611</id><published>2008-09-11T00:32:00.007-03:00</published><updated>2014-04-06T23:53:52.357-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.ScrollTo"/><title type='text'>jQuery.ScrollTo 1.4 released!</title><content type='html'>&lt;h4&gt;Fixes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Fixed the problem when scrolling the window to absolute positioned elements on Safari.&lt;/li&gt;
&lt;li&gt;Fixed the problem on Opera 9.5 when scrolling the window. That it always scrolls to 0.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Added the settings object as 2nd argument to the onAfter callback.&lt;/li&gt;
&lt;li&gt;The 3rd argument of scrollTo can be just a function and it&#39;s used as the onAfter.&lt;/li&gt;
&lt;li&gt;Added full support for iframes (even max scroll calculation).&lt;/li&gt;
&lt;li&gt;Instead of $.scrollTo, $(window).scrollTo() and $(document).scrollTo() can be used(even for iframes).&lt;/li&gt;
&lt;li&gt;Added $().scrollable() that returns the real element to scroll, f.e: $(window).scrollable() == [body|html], works for iframes too.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;I rewrote the scroll limit calculations part, in order to fix the 2 bugs. If you notice any problem, please report.&lt;/p&gt;&lt;p&gt;This version should be perfectly compatible with the latest versions of &lt;a target =&quot;_blank&quot; href=&quot;http://flesler.blogspot.com/2008/02/jqueryserialscroll.html&quot;&gt;SerialScroll&lt;/a&gt; and &lt;a href=&quot;http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html&quot; target=&quot;_blank&quot;&gt;LocalScroll&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I tested this only with jQuery 1.2.6 (from trunk) but it should work well even with pretty old versions of jQuery.&lt;/p&gt;&lt;p&gt;Tested my demos and some iframe experiments on IE 6/7, FF 2/3, Safari 3 and Opera 9.2/5. All worked as expected. Enjoy!&lt;/p&gt;&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo/releases&quot; target=&quot;_blank&quot;&gt;Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo&quot; target=&quot;_blank&quot;&gt;Github Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollTo/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.scrollTo/blob/master/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/6162029551504609611/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/6162029551504609611' title='115 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6162029551504609611'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6162029551504609611'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/09/jqueryscrollto-14-released.html' title='jQuery.ScrollTo 1.4 released!'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>115</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-721331528076674375</id><published>2008-07-26T04:08:00.008-03:00</published><updated>2008-07-28T21:29:21.904-03:00</updated><title type='text'>Moving demos to demos.flesler.com</title><content type='html'>&lt;h4&gt;New host&lt;/h4&gt;
I just wanted to point out that I&#39;m slowly migrating the demos from freewebs.com to demos.flesler.com.&lt;br /&gt;
I bought the domain a week ago or so, but didn&#39;t have the time to move them all.&lt;br /&gt;
I&#39;m also &quot;PHPizing&quot; them a bit, so it takes some extra time.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Moved Demos&lt;/h4&gt;
I&#39;ll update existing links on the blog and will redirect the demos from freewebs(eventually).
&lt;br /&gt;
If you want to know which ones are ready, here&#39;s a list
&lt;br /&gt;
&lt;h5&gt;jQuery Plugins&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollTo/&quot; target=&quot;demo&quot;&gt;ScrollTo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollTo/old/&quot; target=&quot;demo&quot;&gt;ScrollTo Old&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/localScroll/&quot; target=&quot;demo&quot;&gt;LocalScroll&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/localScroll/ajax/&quot; target=&quot;demo&quot;&gt;LocalScroll - AJAX Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/serialScroll/&quot; target=&quot;demo&quot;&gt;SerialScroll&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/preload/link/&quot; target=&quot;demo&quot;&gt;Preload - Link Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/preload/rollover/&quot; target=&quot;demo&quot;&gt;Preload - Rollover Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/preload/url/&quot; target=&quot;demo&quot;&gt;Preload - URL Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/preload/placeholder/&quot; target=&quot;demo&quot;&gt;Preload - Placeholder Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/listen/&quot; target=&quot;demo&quot;&gt;Listen&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollShow/&quot; target=&quot;demo&quot;&gt;ScrollShow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;Regular Scripts&lt;/h5&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jsBash/&quot; target=&quot;demo&quot;&gt;jsBash&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jsDump/&quot; target=&quot;demo&quot;&gt;jsDump&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/Rotator/&quot; target=&quot;demo&quot;&gt;Rotator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/Translator/&quot; target=&quot;demo&quot;&gt;Translator&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/XMLWriter/&quot; target=&quot;demo&quot;&gt;XMLWriter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;What else ?&lt;/h4&gt;
I also plan to have the blog on blog.flesler.com.&lt;br /&gt;
I tried for 5 minutes, but something went wrong in the middle. The redirection didn&#39;t work, so I reverted. I will try soon, after I do some research.

&lt;br /&gt;&lt;br /&gt;

I&#39;ll try to be very careful not to break the demos while I add some more to the mix, if you see a failure please let me know. You can fall back to freewebs for now.&lt;br /&gt;
Don&#39;t forget to update your bookmarks :D .</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/721331528076674375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/721331528076674375' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/721331528076674375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/721331528076674375'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/07/moving-demos-to-demosfleslercom.html' title='Moving demos to demos.flesler.com'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-3327022029008172864</id><published>2008-06-17T16:57:00.012-03:00</published><updated>2008-06-24T12:09:32.490-03:00</updated><title type='text'>jsClass - Object Oriented Javascript</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
jsClass is an extensible Javascript Base &lt;a href=&quot;http://en.wikipedia.org/wiki/Class_(computer_science)&quot; target=&quot;_blank&quot;&gt;Class&lt;/a&gt; that enables you to do clean &lt;a href=&quot;http://en.wikipedia.org/wiki/Object-oriented_programming&quot; target=&quot;_blank&quot;&gt;Object Oriented Programming (OOP)&lt;/a&gt; with Javascript.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Why Object Oriented Programming ?&lt;/h4&gt;
OOP is one of the multiple approaches you can take to structure your code.&lt;br /&gt;
It doesn&#39;t fit any situation, it&#39;s proven to be an outstanding approach to handle large/complex applications.&lt;br /&gt;
It will help you keep your code clear, extensible, decoupled and maintainable.&lt;br /&gt;
For further information on OOP, just check some of the links on this article.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Extensions and Design Patterns&lt;/h4&gt;
jsClass accepts extensions, that is, custom modifications that you can attach to classes.&lt;br /&gt;
Some are tightly related to &lt;a href=&quot;http://en.wikipedia.org/wiki/Design_pattern_(computer_science)&quot; target=&quot;_blank&quot;&gt;Design Patterns&lt;/a&gt;.&lt;br /&gt;
These are general reusable solutions to commonly occurring problems.

&lt;br /&gt;&lt;br /&gt;

Each extension is very well documented on the code, specifying the different ways yo use them. Also, check the demo to see each in action.&lt;br /&gt;
This is the list of built-in extensions:&lt;ul&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;abstract&lt;/h5&gt; Create &lt;a href=&quot;http://en.wikipedia.org/wiki/Abstract_class&quot; target=&quot;_blank&quot;&gt;abstract classes&lt;/a&gt; that cannot be instantiated without extending.
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;extend&lt;/h5&gt; Use &lt;a href=&quot;http://en.wikipedia.org/wiki/Inheritance_%28object-oriented_programming%29&quot; target=&quot;_blank&quot;&gt;inheritance&lt;/a&gt;, make &lt;a href=&quot;http://en.wikipedia.org/wiki/Subclass_%28computer_science%29&quot; target=&quot;_blank&quot;&gt;child classes&lt;/a&gt; extend &lt;a href=&quot;http://en.wikipedia.org/wiki/Superclass_%28computer_science%29&quot; target=&quot;_blank&quot;&gt;base classes&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;getset&lt;/h5&gt; Generate getters and setters for private members of your class.
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;implement&lt;/h5&gt; Create &lt;a href=&quot;http://en.wikipedia.org/wiki/Interface_%28computer_science%29&quot; target=&quot;_blank&quot;&gt;Interfaces&lt;/a&gt; that define methods that need to be defined, in order to implement them.
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;members&lt;/h5&gt; Add &lt;a href=&quot;http://en.wikipedia.org/wiki/Instance_method&quot; target=&quot;_blank&quot;&gt;members&lt;/a&gt; to the instances of your class. It&#39;s a shortcut for SomeClass.members(...).
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;module&lt;/h5&gt; Save your class into a &lt;a href=&quot;http://en.wikipedia.org/wiki/Modularity_(programming)&quot; target=&quot;_blank&quot;&gt;Module&lt;/a&gt;. If required, all the &lt;a href=&quot;http://en.wikipedia.org/wiki/Namespace_%28computer_science%29&quot; target=&quot;_blank&quot;&gt;namespace&lt;/a&gt; is created before saving the class.
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;properties&lt;/h5&gt; Generate properties to control the access to private members of your class.
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;singleton&lt;/h5&gt; Create &lt;a href=&quot;http://en.wikipedia.org/wiki/Singleton_pattern&quot; target=&quot;_blank&quot;&gt;Singleton&lt;/a&gt; classes that can only be instantiated once.
&lt;/li&gt;
&lt;li&gt;
 &lt;h5 class=&quot;setting&quot;&gt;statics&lt;/h5&gt; Add &lt;a href=&quot;http://en.wikipedia.org/wiki/Static_method&quot; target=&quot;_blank&quot;&gt;static methods&lt;/a&gt; or data to your class. It&#39;s a shortcut for SomeClass.statics(...).
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;How to use ?&lt;/h4&gt;
The best way is to see it in action. Check the demo (link below) to see different uses of jsClass and its extensions.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://sourceforge.net/projects/jsclass/&quot; target=&quot;_blank&quot;&gt;Project Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jsclass.sourceforge.net/demo/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jsclass.sourceforge.net/CHANGELOG.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jsclass.sourceforge.net/LICENSE.txt&quot; target=&quot;_blank&quot;&gt;License(BSD)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/3327022029008172864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/3327022029008172864' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/3327022029008172864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/3327022029008172864'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/06/jsclass.html' title='jsClass - Object Oriented Javascript'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-910002053146543015</id><published>2008-06-09T11:08:00.005-03:00</published><updated>2008-06-10T17:35:18.710-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery is on fire!</title><content type='html'>The jQuery team and the UI team have been working very hard lately to bring you these new outstanding releases.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;jQuery 1.2.6&lt;/h4&gt;
This release adds a ton of outstanding changes.&lt;ul&gt;
&lt;li&gt;Many many incredible speed improvements.&lt;/li&gt;
&lt;li&gt;A bunch of improvements to existing methods.&lt;/li&gt;
&lt;li&gt;A complete rewriting of the .attr() method, making it much more versatile and useful.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://brandonaaron.net/docs/dimensions/&quot; target=&quot;_blank&quot;&gt;Dimensions&lt;/a&gt;, by &lt;a href=&quot;http://brandonaaron.net/&quot; target=&quot;_blank&quot;&gt;Brandon Aaron&lt;/a&gt; has been included into the core.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Me&lt;/strong&gt;!&lt;/li&gt;
&lt;/ul&gt;

Go see the official &lt;a href=&quot;http://jquery.com/blog/2008/06/04/jquery-126-events-100-faster/&quot; target=&quot;_blank&quot;&gt;Blog post&lt;/a&gt; to see them all.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;jQuery UI 1.5&lt;/h4&gt;
The excellent &lt;a href=&quot;http://ui.jquery.com/&quot; target=&quot;_blank&quot;&gt;jQuery UI&lt;/a&gt; Module got a new release.&lt;br /&gt;
It brings a ton of features and improvements, as well as a standarized API to manipulate all the widgets.&lt;br /&gt;
Go check their official &lt;a href=&quot;http://jquery.com/blog/2008/06/09/jquery-ui-v15-released-focus-on-consistent-api-and-effects/&quot; target=&quot;_blank&quot;&gt;Blog Post&lt;/a&gt; to learn all about it!

&lt;br /&gt;&lt;br /&gt;

&lt;h5&gt;UI Enchant&lt;/h5&gt;
UI has a set of +15 effects to be used along with the jQuery animations.

&lt;br /&gt;&lt;br /&gt;

&lt;h5&gt;ThemeRoller&lt;/h5&gt;
This widget, provided by the &lt;a href=&quot;http://www.filamentgroup.com/&quot; target=&quot;_blank&quot;&gt;Filament Group&lt;/a&gt;, allows you to fine tune all your UI components and achieve a unique look for your work.&lt;br /&gt;
To read more about it, check the &lt;a href=&quot;http://ui.jquery.com/themeroller&quot; target=&quot;_blank&quot;&gt;ThemeRoller Documentation&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/910002053146543015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/910002053146543015' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/910002053146543015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/910002053146543015'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/06/jquery-is-on-fire.html' title='jQuery is on fire!'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-5772441874629823678</id><published>2008-05-15T15:55:00.006-03:00</published><updated>2008-05-15T16:39:51.618-03:00</updated><title type='text'>jsDump - Pretty dump of any Javascript data</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
This script can dump any type of Javascript data (or most), thus, generating a string out of the received information.&lt;br /&gt;
It&#39;s specially useful when creating some kind of console or logger.&lt;br /&gt;
Also, it can be used for the development stage, when you need to inspect things on browsers that lack a good console. 

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;How to use&lt;/h4&gt;
Very simple:
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; dumped = jsDump.&lt;span class=&quot;method&quot;&gt;parse&lt;/span&gt;( &lt;span class=&quot;comment&quot;&gt;...&lt;/span&gt; );
&lt;/pre&gt;

Instead of &#39;...&#39;, you need to put the data that you want to dump.&lt;br /&gt;
That could be an array, a date, the document, an array of arrays, etc.&lt;br /&gt;
The variable &#39;dumped&#39; will now contain a string with the dumped version of your data.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Settings&lt;/h4&gt;
These are the things you can configure:&lt;ul&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;HTML&lt;/h5&gt; (boolean) If true, the data will be escaped for html output, the default setting is &lt;em&gt;false&lt;/em&gt;.&lt;br /&gt;
Note that the script won&#39;t escape &lt;strong&gt;all&lt;/strong&gt; the text, only the parts added by the script (indentation, new lines, dumped nodes), it won&#39;t alter original strings, etc.
&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;indentChar&lt;/h5&gt; (string) This is the unit of indentation, by default it is 4 whitespaces.&lt;br /&gt;
Keep this agnostic from the HTML mode, it will escape spaces and tabs by itself.
&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;multiline&lt;/h5&gt; (boolean) Whether to generate multiline code. The default is true. This is specially relevant when dumping collections.
&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;DOMAttrs&lt;/h5&gt; (Object) This contains a map of attributes, that need to be dumped from HTML nodes.&lt;br /&gt;
The keys must be the names to be showed. The values, the real name of the attribute contained in the node.&lt;br /&gt;
By default, &#39;id&#39;, &#39;name&#39; and &#39;class&#39; are dumped (only if not empty).
&lt;/li&gt;
&lt;/ul&gt;

To modify these settings, just do (f.e):
&lt;pre class=&quot;js&quot;&gt;
jsDump.&lt;span class=&quot;method&quot;&gt;HTML&lt;/span&gt; = &lt;span class=&quot;keyword&quot;&gt;true&lt;/span&gt;;
&lt;/pre&gt;
This needs to be done before calling .parse().

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;More methods&lt;/h4&gt;
jsDump also contains a method, jsDump.typeOf, that is used internally to sniff the type of what you send.&lt;br /&gt;
You can use this function for your own code, it&#39;ll make an advanced typeof.&lt;br /&gt;
To modify the way a certain kind of data is dumped, you must set that using the method &#39;setParser&#39;.&lt;br /&gt;
The &#39;parser&#39; can be a string, or a function. Use a string if the output is always the same, otherwise, use a function. It will receive the object as argument and must return the parsed string.

&lt;br /&gt;&lt;br /&gt;

You use it like this:(f.e)
&lt;pre class=&quot;js&quot;&gt;
jsDump.&lt;span class=&quot;method&quot;&gt;setParser&lt;/span&gt;( &lt;span class=&quot;string&quot;&gt;&#39;number&#39;&lt;/span&gt;, &lt;span class=&quot;string&quot;&gt;&#39;[number]&#39;&lt;/span&gt; );
jsDump.&lt;span class=&quot;method&quot;&gt;setParser&lt;/span&gt;( &lt;span class=&quot;string&quot;&gt;&#39;date&#39;&lt;/span&gt;, &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( date ){
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; date.&lt;span class=&quot;method&quot;&gt;toUTCString&lt;/span&gt;();
});
&lt;/pre&gt;

To see all the data types, check the source, no gain on listing them all here.&lt;br /&gt;
Lastly, you can create your custom types, by just adding them to the list, then, inside a parser function, you can call the method .parse() and pass, as second argument, the custom data type.&lt;br /&gt;
This will force the script to use that type, instead of sniffing it from the data.


&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.webs.com/jsDump/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jsDump-1.0.0.zip&quot;&gt;jsDump 1.0.0 Code and demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jsDump-1.0.0.js&quot;&gt;jsDump 1.0.0 Source&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/5772441874629823678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/5772441874629823678' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/5772441874629823678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/5772441874629823678'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html' title='jsDump - Pretty dump of any Javascript data'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-3503811589554011893</id><published>2008-05-07T19:50:00.010-03:00</published><updated>2008-10-06T22:58:03.414-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Textnode translator for Javascript</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
This is a generic JS Class, that allows you to translate(parse) the content of text nodes, and replace them for the new content.&lt;br /&gt;
You only need to specify the parsing function, and the starting (root) node.&lt;br /&gt;
All the text nodes inside it, will get parsed.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Modes&lt;/h4&gt;
The class supports synchronous and asynchronous parsing.&lt;br /&gt;
The parsing function will receive the original text as first argument.&lt;br /&gt;
If you can parse the text right away, then just return it from the parsing function.&lt;br /&gt;
If it needs to be delayed (f.e: AJAX request), then the set the attribute &#39;sync&#39; of the instance, to false. By doing this, you will get a second argument in the parsing function, which will be a function that you need to call, passing it the parsed text.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Returned data&lt;/h4&gt;
The parsed data you return can be:&lt;ul&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;a string&lt;/h5&gt; This is the standard, a string replacing the old one.
&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;nothing&lt;/h5&gt;&lt;span class=&quot;new&quot;&gt;new&lt;/span&gt; If you don&#39;t return data, or the same string, it will just get skipped.
&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;a node&lt;/h5&gt;&lt;span class=&quot;new&quot;&gt;new&lt;/span&gt; You can return an html node.
&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;an array&lt;/h5&gt;&lt;span class=&quot;new&quot;&gt;new&lt;/span&gt; You can return an array with nodes and/or strings.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Filtering&lt;span class=&quot;new&quot;&gt;new&lt;/span&gt;&lt;/h4&gt;
Optionally, you can pass the translator, a filtering function. This way you can exclude elements (and their descendants) from the parsing.&lt;br /&gt;
To use it, pass the function as second argument to the constructor.&lt;br /&gt;
It will receive the (element) node, and it must return true or false.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;How to use&lt;/h4&gt;
Check the demo to see both modes and filtering in action.&lt;br /&gt;
You need to call the method &#39;traverse&#39; of the instance, passing it the root node.&lt;br /&gt;
Remember to call the method after the html document is parsed, so you can access all the nodes in it.

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/Translator/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/Translator/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/Translator-1.0.1.zip&quot;&gt;Translator 1.0.1 Zip&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(all files and docs)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/Translator-1.0.1.js&quot;&gt;Translator 1.0.1 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/Translator-1.0.1-min.js&quot;&gt;Translator 1.0.1 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h5 class=&quot;setting&quot;&gt;Update 5/26/08&lt;/h5&gt;
&lt;span class=&quot;small&quot;&gt;Added 1.0.1, updated the docs and demo.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/3503811589554011893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/3503811589554011893' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/3503811589554011893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/3503811589554011893'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/05/textnode-translator-for-javascript.html' title='Textnode translator for Javascript'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-6826479611532761406</id><published>2008-04-28T19:31:00.014-03:00</published><updated>2008-08-06T12:48:45.855-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.SerialScroll"/><title type='text'>Doctorate on jQuery.SerialScroll</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
After replying to a large amount of &lt;a href=&quot;http://flesler.blogspot.com/2008/02/jqueryserialscroll.html#comments&quot; target=&quot;_blank&quot;&gt;comments&lt;/a&gt; and emails about &lt;a href=&quot;http://flesler.blogspot.com/2008/02/jqueryserialscroll.html&quot; target=&quot;_blank&quot;&gt;jQuery.SerialScroll&lt;/a&gt;, I decided to comment some more about this plugin, also to publish some snippets, to achieve commonly desired effects or behaviors.&lt;br /&gt;
This should save you (and me :)) some time. It might also show you some additions, that you haven&#39;t considered.&lt;br /&gt;
I&#39;ll also try to show some more model calls to the plugin, so you can unattach yourself from those in the demo.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;A little bit of theory&lt;/h4&gt;
Before the snippets, I&#39;ll go through the basics, to refresh your mind.&lt;br /&gt;

&lt;h5&gt;Calls to the plugin&lt;/h5&gt;
It can be done on two different kind of elements&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Element to be scrolled:&lt;/strong&gt; This is what you normally do when you want one single instance of SerialScroll in a page.
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;#pane&#39;&lt;/span&gt;).serialScroll({
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;comment&quot;&gt;//...&lt;/span&gt;
});
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Container:&lt;/strong&gt; You might want to create many &quot;SerialScrolls&quot; in the page, you don&#39;t need to call it many times, just put the option &#39;target&#39; to work.
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;div.container&#39;&lt;/span&gt;).serialScroll({
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;comment&quot;&gt;//...&lt;/span&gt;
&lt;span class=&quot;tab&quot; /&gt;target:&lt;span class=&quot;string&quot;&gt;&#39;div.pane&#39;&lt;/span&gt;,
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;comment&quot;&gt;//...&lt;/span&gt;
});
&lt;/pre&gt;
This will allow you to have many divs with class container, which contain a scrollable div with class pane. &lt;strong&gt;They don&#39;t need to be divs&lt;/strong&gt;.&lt;br /&gt;
When doing this, the selectos for the arrows also become relative to the container, instead of absolute.
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Global call:&lt;/strong&gt; If by chance, you want to scroll the window, you&#39;ll need to use this approach.&lt;br /&gt;
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.serialScroll({
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;comment&quot;&gt;//...&lt;/span&gt;
});
&lt;/pre&gt;
If, for some reason, you need to retrieve this implicit element, call:
&lt;pre class=&quot;js&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.scrollTo.window();&lt;/pre&gt;
This will return you the element, don&#39;t use window or document.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;onBefore&lt;/h5&gt;
This setting, which is a callback, will empower some snippets, so you better learn about it.
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;div.container&#39;&lt;/span&gt;).serialScroll({
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;comment&quot;&gt;//...&lt;/span&gt;
&lt;span class=&quot;tab&quot; /&gt;onBefore:&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( e, elem, $pane, $items, pos ){
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;comment&quot;&gt;//...&lt;/span&gt;
&lt;span class=&quot;tab&quot; /&gt;},
&lt;span class=&quot;tab&quot; /&gt;&lt;span class=&quot;comment&quot;&gt;//...&lt;/span&gt;
});
&lt;/pre&gt;
Note that:&lt;ul&gt;
&lt;li&gt;The &#39;this&#39; is the element that triggered the event.&lt;/li&gt;
&lt;li&gt;e is the event object.&lt;/li&gt;
&lt;li&gt;elem is the element we&#39;ll be scrolling to.&lt;/li&gt;
&lt;li&gt;$pane is the element being scrolled.&lt;/li&gt;
&lt;li&gt;$items is the items collection at this moment.&lt;/li&gt;
&lt;li&gt;pos is the position of elem in the collection.&lt;/li&gt;
&lt;li&gt;if it returns false, the event will be ignored.&lt;/li&gt;
&lt;li&gt;Those arguments with $ are jqueryfied.&lt;/li&gt;
&lt;/ul&gt;

The onAfter, only receives &#39;elem&#39; as the first argument, and the &#39;this&#39; is the element being scrolled ($pane but not jqueryfied).

&lt;h4&gt;The snippets&lt;/h4&gt;
Now, what you really want, the code required to do all those fancy things, that the plugin doesn&#39;t do natively.&lt;br /&gt;
One note, all the snippets are wrapped with a document ready and they use symbolic ids. Needless to say, you don&#39;t need to copy the ids, or even USE ids.&lt;br /&gt;
Only the relevant settings are specified, so you will see &quot;...&quot; reminding that it&#39;s incomplete code.&lt;br /&gt;
You configure the selectors and the rest of the settings, according to your needs.

&lt;br /&gt;&lt;br /&gt;

&lt;ul&gt;
&lt;li&gt;Use constant auto-scrolling. &lt;a href=&quot;http://flesler-plugins.googlecode.com/files/SerialScroll_constant-scrolling.js&quot; rel=&quot;nofollow&quot;&gt;get&lt;/a&gt;&lt;span class=&quot;new&quot;&gt;new&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Hide the arrows when the limits are met. &lt;a href=&quot;http://flesler-plugins.googlecode.com/files/SerialScroll_hide-arrows.js&quot; rel=&quot;nofollow&quot;&gt;get&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Stop the auto scrolling on hover. &lt;a href=&quot;http://flesler-plugins.googlecode.com/files/SerialScroll_stop-on-hover-2.js&quot; rel=&quot;nofollow&quot;&gt;get&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Scroll from right to left (or bottom to top). &lt;a href=&quot;http://flesler-plugins.googlecode.com/files/SerialScroll_right-to-left.js&quot; rel=&quot;nofollow&quot;&gt;get&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Manipulate the widget using the keyboard. &lt;a href=&quot;http://flesler-plugins.googlecode.com/files/SerialScroll_use-the-arrows.js&quot; rel=&quot;nofollow&quot;&gt;get&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Generate a pager based on the items. &lt;a href=&quot;http://flesler-plugins.googlecode.com/files/SerialScroll_paginator.js&quot; rel=&quot;nofollow&quot;&gt;get&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;br /&gt;

&lt;h4&gt;Concluding&lt;/h4&gt;
I hope this helped and saved you some time, I also hope you learnt something new.&lt;br /&gt;
I plan to add more snippets as they come up from requests.&lt;br /&gt;
If you have any doubt, don&#39;t hesitate to ask.

&lt;br /&gt;&lt;br /&gt;

&lt;h5 class=&quot;setting&quot;&gt;Update 6/25/08&lt;/h5&gt;
&lt;span class=&quot;small&quot;&gt;Added the constant scrolling snippet&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/6826479611532761406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/6826479611532761406' title='226 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6826479611532761406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6826479611532761406'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/04/doctorate-on-jqueryserialscroll.html' title='Doctorate on jQuery.SerialScroll'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>226</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-5537902863126111562</id><published>2008-04-17T23:07:00.018-03:00</published><updated>2008-06-10T17:35:18.710-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery.Modularize</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
This small plugin(&lt;strong&gt;673 bytes!&lt;/strong&gt;) enables you to have modular methods on jQuery.&lt;br /&gt;
It allows the developer to apply the module pattern, to the functions of jQuery.fn.&lt;br /&gt;
They can be used as namespace/module for more functions.&lt;br /&gt;
This helps keeping the rule of only claiming one name from the jQuery namespace.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Example&lt;/h4&gt;
It takes a module declared like this:
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.fn.foo = &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(){ ... };

&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.fn.foo.bar = &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(){ ... };

&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.fn.foo.baz = &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(){ ... };
&lt;/pre&gt;

And enables you to use it like this:
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(...).foo().bar( ... );

&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(...).foo( .... );

&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(...).foo().baz( ... ).foo().bar( ... ).foo( ... );
&lt;/pre&gt;

As showed above, the method that acts as module, can also be used as function.&lt;br /&gt;
To avoid using it as module, the function must receive arguments.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;How to use&lt;/h4&gt;

&lt;h5&gt;Basic call&lt;/h5&gt;
&lt;pre class=&quot;js&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.modularize( &lt;span class=&quot;string&quot;&gt;&#39;foo&#39;&lt;/span&gt; );&lt;/pre&gt;
If $.fn.foo already exists, it will be used when $(...).foo(...) is called with arguments.&lt;br /&gt;
If $(...).foo(...) won&#39;t be used as method, then you don&#39;t need to declare it, just call the plugin before adding the sub-functions.

&lt;br /&gt;&lt;br /&gt;

&lt;h5&gt;Providing a default method&lt;/h5&gt;
&lt;pre class=&quot;js&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.modularize( &lt;span class=&quot;string&quot;&gt;&#39;foo&#39;&lt;/span&gt;, &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(){ ... } );&lt;/pre&gt;
The given function will be used when $(...).foo(...) is called with arguments.&lt;br /&gt;
This is a shortcut for declaring it, and then calling the plugin.

&lt;br /&gt;&lt;br /&gt;

&lt;h5&gt;Nested calls&lt;/h5&gt;
&lt;pre class=&quot;js&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.modularize( &lt;span class=&quot;string&quot;&gt;&#39;baz&#39;&lt;/span&gt;, &lt;span class=&quot;keyword&quot;&gt;null&lt;/span&gt;, &lt;span class=&quot;keyword&quot;&gt;$.&lt;/span&gt;fn.foo );&lt;/pre&gt;
This allows: &lt;pre class=&quot;js&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(...).foo().baz().foobar( ... )&lt;/pre&gt;
Instead of null, you could send the default method.&lt;br /&gt;
Before doing this call, make sure you created $.fn.foo.

&lt;br /&gt;&lt;br /&gt;

&lt;h5&gt;Miscellaneous&lt;/h5&gt;
The &#39;this&#39; (scope) of the methods, will always be pointing to the calling jQuery object, $(...).&lt;br /&gt;
The methods will be gathered on the first call to the function.&lt;br /&gt;
Thus, you can &quot;modularize&quot; before adding the sub-methods to the module, or after, it doesn&#39;t matter.

&lt;br /&gt;&lt;br /&gt;

If you need to call the module and then add methods, or you just want the methods to be gathered each time, set &lt;pre class=&quot;js&quot;&gt;&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.fn.foo.lazy = &lt;span class=&quot;keyword&quot;&gt;true&lt;/span&gt;;&lt;/pre&gt;
You can set this to true, call the methods, and then reset to false.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://jquery.com/plugins/project/Modularize&quot; target=&quot;_blank&quot;&gt;Project Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.webs.com/jQuery.Modularize/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.modularize-1.0.0.zip&quot;&gt;jQuery.Modularize 1.0.0 Zip&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(all files and docs)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.modularize-1.0.0.js&quot;&gt;jQuery.Modularize 1.0.0 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.modularize-1.0.0-min.js&quot;&gt;jQuery.Modularize 1.0.0 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/5537902863126111562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/5537902863126111562' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/5537902863126111562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/5537902863126111562'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/04/jquerymodularize.html' title='jQuery.Modularize'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-7725787724606779150</id><published>2008-04-07T15:30:00.025-03:00</published><updated>2008-04-15T19:38:04.411-03:00</updated><title type='text'>Benchmarking Javascript variables and function scopes</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
The other day, I was doing a quick &lt;a href=&quot;http://plugins.jquery.com/project/Template&quot; target=&quot;_blank&quot;&gt;templating plugin&lt;/a&gt; for &lt;a href=&quot;http://jquery.com&quot; target=&quot;_blank&quot;&gt;jQuery&lt;/a&gt;. It would split long strings into arrays of tokens, and then parse these, based on a map(associative array) of handlers for the different &quot;commands&quot; in the tokens.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;The Background&lt;/h4&gt;
The thing is, that the &lt;a href=&quot;http://en.wikipedia.org/wiki/Tokenization&quot; target=&quot;_blank&quot;&gt;tokenization&lt;/a&gt; was done on the first call, and only the actual parsing was executed each time the template was applied.&lt;br /&gt;
Surprisingly, the parsing function of the plugin was always taking around 2.5 seconds!&lt;br /&gt;
This was a recursive function, called around 10 times. It had a short loop of 3-4 iterations per call.&lt;br /&gt;
This shouldn&#39;t be SUCH a heavy task, certainly not enough to take that long.&lt;br /&gt;
I was really confused so I started experimenting.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;The Situation&lt;/h4&gt;
There were 3 types of tokens in the template:&lt;ul&gt;
&lt;li&gt;Tokens that open/start a block, f.e: &amp;lt;?if $foo?&amp;gt;.&lt;/li&gt;
&lt;li&gt;Tokens that close/end a block, f.e: &amp;lt;/if?&amp;gt;.&lt;/li&gt;
&lt;li&gt;Tokens that are their own block, f.e: &amp;lt;?elseif $bar/&amp;gt;.&lt;/li&gt;
&lt;/ul&gt;
I called this, the &lt;em&gt;mode&lt;/em&gt; of the token. So I had 3 symbolic constants declared. All the code was wrapped with a self-executing function, to create a local context. It looked like this:

&lt;pre class=&quot;js&quot;&gt;
(&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( $ ){
 &lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt;
     OPEN = &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;,
     CLOSE = &lt;span class=&quot;number&quot;&gt;2&lt;/span&gt;,
     CLOSED = &lt;span class=&quot;number&quot;&gt;3&lt;/span&gt;;
 
 &lt;span class=&quot;comment&quot;&gt;/* the rest of the code */&lt;/span&gt;
 
})( jQuery );
&lt;/pre&gt;

These constants, were compared to a &#39;mode&#39; attribute of the token. This caused 1 reference to each of them, on every loop in the parse function.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;A Small Change&lt;/h4&gt;
I tried tried any possible optimization, but &lt;a href=&quot;http://www.getfirebug.com/&quot; target=&quot;_blank&quot;&gt;Firebug&lt;/a&gt;&#39;s stopwatch was stuck at 2500ms.&lt;br /&gt;
I was nearly desperate, so I started changing things at random.&lt;br /&gt;
One of those changes, was modifying the way I was saving the mode of a token. Instead of storing the integer in a &#39;mode&#39; attribute of the token, I used &#39;open&#39;,&#39;close&#39; and &#39;closed&#39; as boolean attributes.

&lt;br /&gt;&lt;br /&gt;

There&#39;s no way to describe my happiness, when Firebug&#39;s stopwatch showed &lt;strong&gt;~230ms&lt;/strong&gt; instead of &lt;strong&gt;~2500ms&lt;/strong&gt;.&lt;br /&gt;
I must say I was really surprised and confused, this was such a small change, and one that I&#39;d never had guessed.&lt;br /&gt;
After this, I decided to clear my doubts with a consistent benchmark.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;The Benchmark&lt;/h4&gt;
The first thing I did, was to make my &lt;em&gt;&quot;own Firebug&quot;&lt;/em&gt;. I created a script with a stopwatch, a logging method and an easy way to benchmark many sequential calls to a function, with many attempts, generating an average and finding the lowest.&lt;br /&gt;
After that, I set up the environment. Declared a global variable, and a function similar to the one showed above. Then nested another equal function inside it, and nested another one inside the latter.&lt;br /&gt;
In the end, it looked like this:
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; global = &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;;

(&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(){
   &lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; local1 = &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;;

   (&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(){
      &lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; local2 = &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;;  

      (&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(){
         &lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; local3 = &lt;span class=&quot;number&quot;&gt;1&lt;/span&gt;;

         &lt;span class=&quot;comment&quot;&gt;/* here I executed the benchmark */&lt;/span&gt;  
  
      })();  
   })(); 
})();
&lt;/pre&gt;
This created 4 variables, 1 global, and 3 local. All of them could be accessed from where the benchmark was being ran, but they belonged to different scope chains.
I benchmarked 4 functions, each of them accessed one of these variables 400,000 times with a loop.&lt;br /&gt;
Each benchmark was tested 5 times, in order to find an average and the minimum. The latter should be the one that really matters. I tested on all 4 major browsers, on my Windows XP.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;The Results&lt;/h4&gt;
The numbers were surprising, but not in all browsers. Opera 9 seemed to be really indifferent to the scope chain, all took the same time. Firefox 2 was really the slowest. Safari 3 and IE6 were in the middle.&lt;br /&gt;
These are the numbers, I&#39;ll only mention the lowest from the 5 attempts.

&lt;pre class=&quot;js&quot;&gt;
&lt;h5 class=&quot;setting&quot;&gt;Firefox 2&lt;/h5&gt;
* global: 969ms
* local1: 672ms
* local2: 359ms
* local3: 78ms

&lt;h5 class=&quot;setting&quot;&gt;IE 6(=7)&lt;/h5&gt;
* global: 187ms
* local1: 171ms
* local2: 125ms
* local3: 94ms

&lt;h5 class=&quot;setting&quot;&gt;Safari 3&lt;/h5&gt;
* global: 125ms
* local1: 93ms
* local2: 78ms
* local3: 62ms

&lt;h5 class=&quot;setting&quot;&gt;Firefox 3 beta 5&lt;/h5&gt;
* global: 41ms
* local1: 48ms
* local2: 48ms
* local3: 37ms

&lt;h5 class=&quot;setting&quot;&gt;Opera 9&lt;/h5&gt;
* global: 31ms
* local1: 31ms
* local2: 31ms
* local3: 31ms
&lt;/pre&gt;

Opera is the clear champion, for some reason, the scope doesn&#39;t affect the timing at all.&lt;br /&gt;
It does affect the rest of the browsers. It will be specially noticeable in Firefox. Note that Firebug was turned off while benchmarking Firefox, it did affect the perfomance but not THAT much.&lt;br /&gt;
&lt;strong&gt;UPDATE:&lt;/strong&gt;Added IE7 and Firefox 3 beta, congratz Mozilla, much better!

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;The Conclusions&lt;/h4&gt;

&lt;h5&gt;Referencing might take time.&lt;/h5&gt;
Using variables that were declared on different scope chains, takes longer than those that are local to the executing function.&lt;br /&gt;
If you are going to use one very often inside a deeply nested function, you should save it in a local variable first.&lt;br /&gt;
One common situation is when using the global variables &lt;em&gt;window&lt;/em&gt; and &lt;em&gt;document&lt;/em&gt;.&lt;br/&gt;

&lt;h5&gt;It does matter, but it&#39;s not always crucial.&lt;/h5&gt;
Although it does make a difference, you shouldn&#39;t become paranoid about this.&lt;br /&gt;
These numbers were produced by 400,000 iterations. You probably don&#39;t access a variable that many times. Optimizing won&#39;t yield a noticeable improvement most of the time.&lt;br /&gt;
There are some situations where you should be careful though&lt;ul&gt;
&lt;li&gt;Within loops, if you have a long loop, caching the variable could improve the perfomance greatly.&lt;/li&gt;
&lt;li&gt;Inside frequently called functions. This is similar to loops.&lt;/li&gt;
&lt;li&gt;Inside functions, that are deeply nested inside others. If these reference a distant variable, many times, it could hit on perfomance too.&lt;/li&gt;
&lt;/ul&gt;

&lt;h5&gt;Benchmarking is fun!&lt;/h5&gt;
I always love running benchmarks, feel free to try this yourself. You&#39;ll find the link below.&lt;br /&gt;
The tool used for the benchmark (benchmark.js) can be taken for your own experiments.&lt;br /&gt;
If you try other browsers/OS, feel free to post the results, I&#39;ll include them so others can see.

&lt;br /&gt;&lt;br /&gt;

I tried to find links about this, but none showed up. I&#39;ll update if I get to find any. Same for you, reader. If you can find articles about this, I&#39;ll add the links to this post.
&lt;br /&gt;&lt;br /&gt;
Thanks for reading.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.webs.com/Benchmark/vars/&quot; target=&quot;_blank&quot;&gt;Benchmark&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/variables-benchmark.zip&quot;&gt;Benchmark files and demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/7725787724606779150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/7725787724606779150' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/7725787724606779150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/7725787724606779150'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/04/benchmarking-javascript-variables-and.html' title='Benchmarking Javascript variables and function scopes'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-6250458453819628542</id><published>2008-04-05T05:12:00.008-03:00</published><updated>2008-06-10T17:35:18.711-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery.FastTrigger</title><content type='html'>&lt;h4&gt;What is it&lt;/h4&gt;
This small plugin includes a clean and simplified version of jQuery.trigger, that will perform better and will specially scale better.

&lt;h4&gt;How is this achieved&lt;/h4&gt;
Many useless steps are skipped when programatically triggering an event, this step that jQuery does no matter what, are not really necessary for triggered events, and some of them hit on perfomance badly. Most of them are not optimized for speed and scalability, but for reusability and code size.

&lt;h4&gt;Differences with trigger&lt;/h4&gt;
This method supports array of data (can include an event object), namespaced events and exclusive triggering. The only known difference with jQuery.trigger is that this method doesn&#39;t trigger native handlers, so it&#39;s actually comparable to .triggerHandler().

&lt;h4&gt;Perfomance&lt;/h4&gt;
This is method is &lt;u&gt;at least&lt;/u&gt; &lt;strong&gt;4 times faster&lt;/strong&gt; than the regular trigger, and &lt;u&gt;will scale much better&lt;/u&gt; as you call it more elements at once.

&lt;h4&gt;Global triggering&lt;/h4&gt;
The equivalent for jQuery.event.trigger, is $.fastTrigger it accepts the same arguments as its prototype&#39;s counter-part, but triggers the event on &lt;b&gt;all&lt;/b&gt; the elements in the page.
This is a dangerous method to use, as it may hang the browser if the page has many elements, using $.fastTrigger won&#39;t solve the problem, but will surely perform better.
This case should show off the previously mentioned (improved) scalability.

&lt;h4&gt;A few examples&lt;/h4&gt;
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;ul li&#39;&lt;/span&gt;).fastTrigger(&lt;span class=&quot;string&quot;&gt;&#39;mouseover&#39;&lt;/span&gt;);&lt;span class=&quot;comment&quot;&gt;//regular&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;h1&#39;&lt;/span&gt;).fastTrigger(&lt;span class=&quot;string&quot;&gt;&#39;click.foo&#39;&lt;/span&gt;);&lt;span class=&quot;comment&quot;&gt;//with namespace&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;li p&#39;&lt;/span&gt;).fastTrigger(&lt;span class=&quot;string&quot;&gt;&#39;focus!&#39;&lt;/span&gt;);&lt;span class=&quot;comment&quot;&gt;//exclusive&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;ul.list&#39;&lt;/span&gt;).fastTrigger(&lt;span class=&quot;string&quot;&gt;&#39;collapse&#39;&lt;/span&gt;);&lt;span class=&quot;comment&quot;&gt;//custom event&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;#bar&#39;&lt;/span&gt;).fastTrigger(&lt;span class=&quot;string&quot;&gt;&#39;click&#39;&lt;/span&gt;, [&lt;span class=&quot;string&quot;&gt;&#39;foo&#39;&lt;/span&gt;]);&lt;span class=&quot;comment&quot;&gt;//data array&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;.fastTrigger(&lt;span class=&quot;string&quot;&gt;&#39;keypress&#39;&lt;/span&gt;);&lt;span class=&quot;comment&quot;&gt;//global triggering&lt;/span&gt;
&lt;span class=&quot;keyword&quot;&gt;$&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;a&#39;&lt;/span&gt;).fastTrigger(&lt;span class=&quot;string&quot;&gt;&#39;blur&#39;&lt;/span&gt;,[obj]]);&lt;span class=&quot;comment&quot;&gt;//your event object&lt;/span&gt;
&lt;/pre&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://jquery.com/plugins/project/FastTrigger&quot; target=&quot;_blank&quot;&gt;Project Page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.fastTrigger-1.0.0.zip&quot;&gt;jQuery.FastTrigger 1.0.0 Zip&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(all files and docs)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.fastTrigger-1.0.0.js&quot;&gt;jQuery.FastTrigger 1.0.0 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.fastTrigger-1.0.0-min.js&quot;&gt;jQuery.FastTrigger 1.0.0 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/6250458453819628542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/6250458453819628542' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6250458453819628542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6250458453819628542'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/04/jqueryfasttrigger.html' title='jQuery.FastTrigger'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-6120995634251668765</id><published>2008-03-29T19:53:00.031-03:00</published><updated>2008-11-19T19:37:16.951-02:00</updated><title type='text'>String Tokenizer for Javascript</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
This small class can easily parse a string, and generate different kind of tokens. It&#39;s very simple and straight-forward. It can perform as a base for other string parsing scripts, like templating engines, custom language interpreters, and many more.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;jQuery plugin vs standalone&lt;/h4&gt;
When called, the script will generate the class, and if jQuery is detected, it will be saved at $.tokenizer.&lt;br /&gt;
Otherwise, the class is saved at (window.)Tokenizer.&lt;br /&gt;
Note that this script doesn&#39;t need jQuery at all, this option is added to ease on jQuery developers.

&lt;br /&gt;&lt;br /&gt;


&lt;h4&gt;How to use&lt;/h4&gt;
The constructor of the class takes 2 arguments, 1 is optional.&lt;ul&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;tokenizers&lt;/h5&gt; This is a collection of strings/regexes that match the tokens.&lt;br /&gt;
The Regexes don&#39;t need to include back-references, they can though, but the whole match will be considered a token.&lt;br /&gt;
If you use regex, it&#39;s important that you &lt;u&gt;DON&#39;T&lt;/u&gt; make it &lt;a href=&quot;http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:RegExp:global&quot; target=&quot;_blank&quot;&gt;global&lt;/a&gt;.&lt;br /&gt;
You can send an array of tokenizers, or just one.
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;build&lt;/h5&gt; This is a parsing function, it will get called for each token found, and also for the string between tokens. It should return the parsed token, note this doesn&#39;t need to be a string, the returned token can be an array, an object, etc.&lt;br /&gt;
If no function is given, the tokens are the matched strings.&lt;br /&gt;
The function receives 3 arguments:&lt;ol class=&quot;mine&quot;&gt;
&lt;li&gt;The string token that was matched.&lt;/li&gt;
&lt;li&gt;Whether it is a matched token, or the string between 2 tokens (true means real token, false, plain string).&lt;/li&gt;
&lt;li&gt;The tokenizer that matched this string, or the one that skipped over this slice in the case of plain strings.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
 
As mentioned, build won&#39;t just get called for each token found, but also for the strings between tokens. Use the second argument to know which one it is.

After you create the tokenizer, you call the method .parse() passing the string, and it will return the array of tokens. You might want to actually do what you need, inside the build method, and just ignore the returned array.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Examples&lt;/h4&gt;
&lt;pre class=&quot;js&quot;&gt;
Templating

&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; values = { name:&lt;span class=&quot;string&quot;&gt;&#39;Joe&#39;&lt;/span&gt;, age:&lt;span class=&quot;number&quot;&gt;32&lt;/span&gt;, surname:&lt;span class=&quot;string&quot;&gt;&#39;Smith&#39;&lt;/span&gt; };
&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; tokenizer = &lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;class&quot;&gt;Tokenizer&lt;/span&gt;([
    &lt;span class=&quot;regex&quot;&gt;/&amp;lt;%(\w+)%&amp;gt;/&lt;/span&gt;, &lt;span class=&quot;regex&quot;&gt;/\$(\w+)/&lt;/span&gt;
 ],&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( src, real, re ){
    &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; real ? src.replace(re,&lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;(all,name){
       &lt;span class=&quot;keyword&quot;&gt;return&lt;/span&gt; values[name];
    }) : src;
  }
);
&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; tpl = &lt;span class=&quot;string&quot;&gt;&#39;&amp;lt;%name%&amp;gt; $surname is $age years old.&#39;&lt;/span&gt;;
&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; tokens = tokenizer.&lt;span class=&quot;method&quot;&gt;parse&lt;/span&gt;(tpl);
document.body.innerHTML = tokens.join(&lt;span class=&quot;string&quot;&gt;&#39;&#39;&lt;/span&gt;);
&lt;/pre&gt;
&lt;pre class=&quot;js&quot;&gt;
CSV parser

&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; rows = &lt;span class=&quot;keyword&quot;&gt;[ ]&lt;/span&gt;, row = rows[&lt;span class=&quot;number&quot;&gt;0&lt;/span&gt;] = &lt;span class=&quot;keyword&quot;&gt;[ ]&lt;/span&gt;; 
&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; csv = &lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;class&quot;&gt;Tokenizer&lt;/span&gt;( [&lt;span class=&quot;string&quot;&gt;&#39;,&#39;&lt;/span&gt;,&lt;span class=&quot;string&quot;&gt;&#39;;&#39;&lt;/span&gt;],
  &lt;span class=&quot;keyword&quot;&gt;function&lt;/span&gt;( text, isSeparator ){
     &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt;( isSeparator ){
         &lt;span class=&quot;keyword&quot;&gt;if&lt;/span&gt;( text == &lt;span class=&quot;string&quot;&gt;&#39;;&#39;&lt;/span&gt; ){&lt;span class=&quot;comment&quot;&gt;//new row&lt;/span&gt;
             row = &lt;span class=&quot;keyword&quot;&gt;[ ]&lt;/span&gt;;
             rows.&lt;span class=&quot;method&quot;&gt;push&lt;/span&gt;(row);
         }
     }else{   
         row.&lt;span class=&quot;method&quot;&gt;push&lt;/span&gt;(text);
     } 
  }
);
csv.&lt;span class=&quot;method&quot;&gt;parse&lt;/span&gt;(&lt;span class=&quot;string&quot;&gt;&#39;Joe,Smith,32;Jane,Doe,26;Mike,Bowel,54&#39;&lt;/span&gt;);
&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/Tokenizer-1.0.1.zip&quot;&gt;Tokenizer 1.0.1 Zip&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(all files and docs)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/tokenizer-1.0.1.js&quot;&gt;Tokenizer 1.0.1 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/tokenizer-1.0.1-min.js&quot;&gt;Tokenizer 1.0.1 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/6120995634251668765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/6120995634251668765' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6120995634251668765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/6120995634251668765'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/03/string-tokenizer-for-javascript.html' title='String Tokenizer for Javascript'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-9160415973726711436</id><published>2008-03-12T11:23:00.012-02:00</published><updated>2012-02-17T12:51:05.832-03:00</updated><title type='text'>XMLWriter for Javascript</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
This is a Javascript class, based on .NET&#39;s &lt;a href=&quot;http://msdn2.microsoft.com/en-us/library/system.xml.xmltextwriter(VS.71).aspx&quot; target=&quot;_blank&quot;&gt;XMLTextWriter&lt;/a&gt;.&lt;br /&gt;
This is &lt;strong&gt;not&lt;/strong&gt; a port, but a reduced and adapted version.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Constructor&lt;/h4&gt;
The constructor accepts 2 optional arguments: encoding, and version. You call it like this:
&lt;pre class=&quot;js&quot;&gt;
&lt;span class=&quot;keyword&quot;&gt;var&lt;/span&gt; xw = &lt;span class=&quot;keyword&quot;&gt;new&lt;/span&gt; XMLWriter( &lt;span class=&quot;string&quot;&gt;&#39;UTF-8&#39;&lt;/span&gt;, &lt;span class=&quot;string&quot;&gt;&#39;1.0&#39;&lt;/span&gt; );
&lt;/pre&gt;

&lt;h4&gt;Methods&lt;/h4&gt;
Class instances have the following methods:&lt;ul&gt;
&lt;li&gt;&lt;h5&gt;writeStartDocument([ bool standalone ])&lt;/h5&gt;
Opens a new document, must be call on start, if standalone is specified, standalone=&quot;true/false&quot; will be added to the header.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeEndDocument()&lt;/h5&gt;
Closes the active document, it&#39;s not really mandatory to call it.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeDocType( string declarations )&lt;/h5&gt;
Adds a doctype to the document, can be called at anytime. If specified, a doctype will be included in the generated xml, in this form:&lt;br /&gt;
&amp;lt;!DOCTYPE root-element declarations&amp;gt;
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeStartElement( string name [, string ns ] )&lt;/h5&gt;
Creates a new node element with this name, and it becomes the active element. A namespace can be specified.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeEndElement()&lt;/h5&gt;
Closes the active element and goes up one level.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeAttributeString( string attr, string value )&lt;/h5&gt;
Adds an attribute to the active element.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeString( string text )&lt;/h5&gt;
Adds a text node to the active element.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeElementString( string name, string txt [, string ns ] )&lt;/h5&gt;
Shortcut method, creates an element, adds the text and closes  it.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeCDATA( string text )&lt;/h5&gt;
Adds a text node wrapped with CDATA, to the active element.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;writeComment( string text )&lt;/h5&gt;
Adds a comment node to the active element.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;flush(): string&lt;/h5&gt;
Generates the XML string and returns it.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;close()&lt;/h5&gt;
Closes the writer and cleans up.
&lt;/li&gt;
&lt;li&gt;&lt;h5&gt;getDocument()&lt;/h5&gt;
Generates a real XMLDocument from the writer. This method doesn&#39;t belong to the original class.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Formatting&lt;/h4&gt;
You can choose whether the generated XML is formatted or not, and how. You can modify the following options for each instance or from XMLWriter.prototype to affect them all:&lt;ul&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;encoding&lt;/h5&gt; &#39;ISO-8859-1&#39; by default.&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;version&lt;/h5&gt; &#39;1.0&#39; by default.&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;formatting&lt;/h5&gt; &#39;indented&#39;(default) or &#39;none&#39;.&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;indentChar&lt;/h5&gt; &#39;\t&#39; by default, char to indent.&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;indentation&lt;/h5&gt; # of chars added per level, 1 by default.&lt;/li&gt;
&lt;li&gt;&lt;h5 class=&quot;setting&quot;&gt;newLine&lt;/h5&gt; &#39;\n&#39; by default, char to separate lines.&lt;/li&gt;
&lt;/ul&gt;
If you choose formatting = &#39;none&#39;, you don&#39;t need to modify indentChar, indentation or newLine.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/XMLWriter/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.opensource.org/licenses/bsd-license.php&quot; target=&quot;_blank&quot;&gt;License (BSD)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://aspnet.4guysfromrolla.com/articles/092403-1.aspx&quot;&gt;.NET demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/XMLWriter-1.0.0.js&quot;&gt;XMLWriter 1.0.0 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/XMLWriter-1.0.0-min.js&quot;&gt;XMLWriter 1.0.0 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/9160415973726711436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/9160415973726711436' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/9160415973726711436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/9160415973726711436'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/03/xmlwriter-for-javascript.html' title='XMLWriter for Javascript'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-7073164068523618839</id><published>2008-03-10T22:44:00.011-02:00</published><updated>2012-09-13T12:33:12.987-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery.SerialScroll 1.2 released</title><content type='html'>I added a major release of jQuery.SerialScroll. It includes a ton of new features and allows close integration with &lt;a href=&quot;http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html&quot; target=&quot;_blank&quot;&gt;jQuery.LocalScroll&lt;/a&gt;.  &lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Fixes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;If you call the plugin on the same (scrollable)element more than once, the custom events get bound only on the first call.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Changes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The event &#39;start&#39; no longer receives the interval, you must set it at start, stop/start only pause/restart.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;You can notify SerialScroll that the active item changed, by using the event notify.serialScroll.&lt;/li&gt;
&lt;li&gt;Thanks to the event notify, this plugin can be now closely integrated with LocalScroll(1.2.5 or higher).&lt;/li&gt;
&lt;li&gt;Also, thanks to notify, you can call SerialScroll on the same element more than once, and they interact nicely.&lt;/li&gt;
&lt;li&gt;You can specify the option &#39;target&#39;, and then the matched elements become the context of all the selectors, and target matches the element to be scrolled. This allows you to call SerialScroll on many element at the same time.&lt;/li&gt;
&lt;li&gt;You can combine the options &#39;jump&#39; and &#39;lazy&#39; (not adviced if no target is specified).&lt;/li&gt;
&lt;li&gt;LocalScroll and SerialScroll are so compatible, that they can use the same hash of settings.&lt;/li&gt;
&lt;li&gt;Added option &#39;constant&#39;(true by default), specifies whether the speed must be constant or not.&lt;/li&gt;
&lt;li&gt;Added option &#39;navigation&#39; to add a group of element to jump to the items.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://flesler.blogspot.com/2008/02/jqueryserialscroll.html&quot;&gt;Main Post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plugins.jquery.com/project/SerialScroll&quot; target=&quot;_blank&quot;&gt;Project Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.webs.com/jQuery.SerialScroll/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.blogspot.com/2007/10/jqueryscrollto.html&quot;&gt;jQuery.ScrollTo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.webs.com/jQuery.ScrollTo/&quot; target=&quot;_blank&quot;&gt;jQuery.ScrollTo&#39;s demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.webs.com/jQuery.SerialScroll/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.serialScroll-1.2.1.js&quot;&gt;jQuery.SerialScroll 1.2.1 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.serialScroll-1.2.1-min.js&quot;&gt;jQuery.SerialScroll 1.2.1 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.3.3.js&quot;&gt;jQuery.ScrollTo 1.3.3 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.3.3-min.js&quot;&gt;jQuery.ScrollTo 1.3.3 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;em&gt;I really advice using the minified versions. The code is optimized for those releases. Source versions should only serve to learn.&lt;/em&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/7073164068523618839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/7073164068523618839' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/7073164068523618839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/7073164068523618839'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/03/jqueryserialscroll-120-released.html' title='jQuery.SerialScroll 1.2 released'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-2398733521291939275</id><published>2008-03-01T02:37:00.020-02:00</published><updated>2012-09-13T12:33:38.986-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.SerialScroll"/><title type='text'>jQuery.SerialScroll 1.1 released</title><content type='html'>I added a major release of jQuery.SerialScroll. It doesn&#39;t have that many changes, but I really feel it made one step ahead.  &lt;h4&gt;Optimizations&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The animation is skipped if a bad position was received or it&#39;s the same as the actual. Saving some overhead.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Changes&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;Changed the licensing from GPL to GPL+MIT.&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Features&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;The plugin binds 3 events to the container to allow external manipulation. They are clearly explained in the main post, please check it.&lt;/li&gt;
&lt;li&gt;Added 2 more arguments to the onBefore callback: actual item collection, index of the actual item in the collection.&lt;/li&gt;
&lt;li&gt;Added option &#39;interval&#39;, can be a number specifying the amount of milliseconds for autoscrolling.&lt;/li&gt;
&lt;/ul&gt;I upgraded the main post and it has extensive and detailed documentation. Also added some more text and options to the demo.  &lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://flesler.blogspot.com/2008/02/jqueryserialscroll.html&quot;&gt;Main Post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/flesler/jquery.serialScroll&quot; target=&quot;_blank&quot;&gt;Github Repo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/serialScroll/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.blogspot.com/2007/10/jqueryscrollto.html&quot;&gt;jQuery.ScrollTo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/scrollTo/&quot; target=&quot;_blank&quot;&gt;jQuery.ScrollTo&#39;s demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/serialScroll/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.serialScroll-1.2.2.js&quot;&gt;jQuery.SerialScroll 1.2.2 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.serialScroll-1.2.2-min.js&quot;&gt;jQuery.SerialScroll 1.2.2 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.4.3.1.js&quot;&gt;jQuery.ScrollTo 1.4.3.1 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.scrollTo-1.4.3.1-min.js&quot;&gt;jQuery.ScrollTo 1.4.3.1 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;em&gt;I really advice using the minified versions. The code is optimized for those releases. Source versions should only serve to learn.&lt;/em&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/2398733521291939275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/2398733521291939275' title='115 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/2398733521291939275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/2398733521291939275'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/03/jqueryserialscroll-110-released.html' title='jQuery.SerialScroll 1.1 released'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>115</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-4940446543552111234</id><published>2008-02-20T15:29:00.008-02:00</published><updated>2008-03-02T18:33:59.352-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Rotator</title><content type='html'>&lt;h4&gt;Introduction&lt;/h4&gt;
This small Javascript class, serves as a generic rotator for different kind of collections.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Arguments&lt;/h4&gt;
The Rotator class constructor expects 3 arguments, the last 2 are optional.
&lt;ul&gt;
  &lt;li&gt;&lt;h5&gt;collection&lt;/h5&gt;
 Can be a string, an array or an array-like object( arguments, nodelist, numeric hash ).
 &lt;br /&gt;If it&#39;s a string, it will get split by character.
  &lt;/li&gt;
  &lt;li&gt;&lt;h5&gt;setter&lt;/h5&gt;
 A function that receives a value, an element of the collection and it&#39;s index.
 &lt;br /&gt;It must, either set the value internally or return the new value.
 &lt;br /&gt;The scope (this) will be the element, the arguments are the value and then the index.
 &lt;br /&gt;If it&#39;s a string, it means you want to set the value to the attribute of the element with that name.
 &lt;br /&gt;If none is given, then Rotator.defaultSetter is used, which, by default, returns the new value.
  &lt;/li&gt;
  &lt;li&gt;&lt;h5&gt;getter:&lt;/h5&gt;
 A function that receives an element of the collection and the index.
 &lt;br /&gt;It must return the desired information from them.
 &lt;br /&gt;The scope (this) will be the element and the first argument, the index.
 &lt;br /&gt;If it&#39;s a string, it means you want the attribute of the element with that name.
 &lt;br /&gt;If none is given, then Rotator.defaultGetter is assigned, which, by default, returns the element.
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;How to use&lt;/h4&gt;
Once you create an instance (obj) of the class, you can get/set the collection using the method obj.collection().&lt;br /&gt;
To rotate the elements, call obj.left() or obj.right().&lt;br /&gt;
With each call, the elements will be rotated one position in the direction you specified, and the functions will be called.&lt;br /&gt;
Note that the collection held by the object won&#39;t be the same that you gave it. Yours remains untouched.

&lt;br /&gt;&lt;br /&gt;

Check the demo to see it working. If you view the source, you&#39;ll see 3 different instances.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.webs.com/Rotator/&quot; target=&quot;_blank&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/rotator-1.0.0.zip&quot;&gt;Rotator 1.0.0 Zip&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(all files and docs)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/rotator-1.0.0.js&quot;&gt;Rotator 1.0.0 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/rotator-1.0.0-min.js&quot;&gt;Rotator 1.0.0 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/4940446543552111234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/4940446543552111234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/4940446543552111234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/4940446543552111234'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/02/rotator.html' title='Rotator'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8640596986273216089.post-2089927223105816345</id><published>2008-02-20T10:47:00.007-02:00</published><updated>2008-07-26T13:44:15.027-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery.Listen"/><title type='text'>jQuery.Listen 1.0 released</title><content type='html'>I updated jQuery.Listen and it got to it&#39;s first stable version. This release includes mostly features. A few optimizations and a couple of structural changes.&lt;br /&gt;
As specified in the change list, the licensing changed from GPL to GPL+MIT.

&lt;br /&gt;&lt;br /&gt;

&lt;h4&gt;Optimizations&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Reduced the code size, this release (with all its features) is smaller than the previous one.&lt;/li&gt;
&lt;li&gt;Added many optimizations for minified code size.&lt;/li&gt;
&lt;li&gt;Improved the cleaning done on window.onload to avoid memory leaks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Fixes&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;The [].splice.call(arguments,..) wasn&#39;t working in my Opera.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Changes&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;$.listen is not used for stopping/restarting the indexers.&lt;br /&gt;
use $(..).indexer(...).(start|stop)() instead.&lt;/li&gt;
&lt;li&gt;Changed the licensing from GPL to GPL+MIT.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Features&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Added Jörn Zaefferer&#39;s approach of focusin/focusout. You can now safely listen for blur and focus events.&lt;/li&gt;
&lt;li&gt;Added $(..).indexer( event_name ) to get access to the indexers of the first matched element and $.indexer(..) to the global indexer.&lt;/li&gt;
&lt;li&gt;$.listen.fixes is a hash that maps event/fixedEvent. If you add a fix at $.event.special, add it to this hash and it will work automatically.&lt;/li&gt;
&lt;li&gt;It&#39;s possible to instruct indexers to emulate the natural bubbling like this: $(..).indexer( ... ).bubbles = true, use with discretion, will hit on perfomance.&lt;/li&gt;
&lt;li&gt;Added support for multiple events separated with spaces.&lt;/li&gt;
&lt;/ul&gt;

Kudos to &lt;a href=&quot;http://bassistance.de/&quot; target=&quot;_blank&quot;&gt;Jörn Zaefferer&lt;/a&gt; for lending me the code that now allows listening for focus and blur!

&lt;h4&gt;Links&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler.blogspot.com/2007/10/jquerylisten.html&quot; rel=&quot;start&quot;&gt;Main Post&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jquery.com/plugins/project/Listen&quot; target=&quot;_blank&quot;&gt;Project Page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/listen/&quot; target=&quot;_blank&quot;&gt;Small demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://demos.flesler.com/jquery/listen/changes.txt&quot; target=&quot;_blank&quot;&gt;Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;Downloads&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.listen-1.0.3.zip&quot;&gt;jQuery.Listen 1.0.3 Zip&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(all files and docs)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.listen-1.0.3.js&quot;&gt;jQuery.Listen 1.0.3 Source&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(to learn or test)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://flesler-plugins.googlecode.com/files/jquery.listen-1.0.3-min.js&quot;&gt;jQuery.Listen 1.0.3 Minified&lt;/a&gt;&lt;span class=&quot;dw-tip&quot;&gt;(recommended)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;em&gt;I really advice using the minified versions. The code is optimized to those releases. Source versions should only serve to learn.&lt;/em&gt;</content><link rel='replies' type='application/atom+xml' href='http://flesler.blogspot.com/feeds/2089927223105816345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/8640596986273216089/2089927223105816345' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/2089927223105816345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8640596986273216089/posts/default/2089927223105816345'/><link rel='alternate' type='text/html' href='http://flesler.blogspot.com/2008/02/jquerylisten-10-released.html' title='jQuery.Listen 1.0 released'/><author><name>Ariel Flesler</name><uri>http://www.blogger.com/profile/17700414222186772120</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPreV2iC5cFMwTvwmGGsej1OHf4MoRaS1CMEFJZO_uijllhdsEHrWiUnkXtFWukFAgDUlzBWlI7ZcspErzJ0Uv5Pq1OHW7Cdxfp1VZKf1Ec3oS2vtPeJSRi6a6i-xhc9w/s220/n1133276770_1267.jpg'/></author><thr:total>13</thr:total></entry></feed>