<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>(function() { &#187; plugins</title>
	<atom:link href="http://maxb.net/blog/tag/plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://maxb.net/blog</link>
	<description>// MAXB.NET LABS</description>
	<lastBuildDate>Mon, 16 May 2011 19:12:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>jbgallery 3.0</title>
		<link>http://maxb.net/blog/2010/12/19/jbgallery-3-0/</link>
		<comments>http://maxb.net/blog/2010/12/19/jbgallery-3-0/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 18:31:46 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jbgallery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=646</guid>
		<description><![CDATA[DEMO SITE &#8211; (UPDATED 2011-05-16) WHAT&#8217;S NEW New option! &#8211; fullscreen : false(resize box &#38; refresh to test. use menu on bottom.) Many gallery Randomize your galleries Try new API to push/pop, shift/unshift images from outside (mandatory one image in &#8230; <a href="http://maxb.net/blog/2010/12/19/jbgallery-3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="/scripts/jbgallery/" target="_blank">DEMO SITE</a> &#8211; <strong>(UPDATED 2011-05-16)</strong></p>
<h2>WHAT&#8217;S NEW</h2>
<ul>
<li><a href="/scripts/jbgallery/docs/jbox/test_jbox.html" class="blank">New option! &#8211; fullscreen : false</a><br /><strong>(resize box &amp; refresh to test. use menu on bottom.)</strong></li>
<li><a href="/scripts/jbgallery/docs/jbox/test_jbox_multi.html" class="blank">Many gallery</a></li>
<li><a href="/scripts/jbgallery/docs/options/randomize_slideshow.html" class="blank">Randomize your galleries</a></li>
<li><a href="/scripts/jbgallery/docs/advanced/api.html" class="blank">Try new API to push/pop, shift/unshift images from outside</a> (mandatory one image in markup)</li>
<li><a href="/scripts/jbgallery/docs/advanced/push.html" class="blank">See a basic push example</a></li>
<li><a href="/scripts/jbgallery/docs/advanced/push_hundreds_from_picasa_menuslider.html" class="blank">See how push hundreds images from outside</a> (my picasa feed)</li>
<li><a href="/scripts/jbgallery/docs/adapters/picasa_api.html" class="blank">See an example of adapter that use new API</a></li>
<li><a href="/scripts/jbgallery/docs/debug/test.html" class="blank">Test zoom, centered and original style option</a></li>
<li><a href="/scripts/jbgallery/docs/caption/caption.html" class="blank">Caption simplified and improved</a> (see html markup)</li>
</ul>
<p>
    jbgallery is a UI widget webpage written in javascript on top of the jQuery library.<br />
    Its function is to show a single big image, multiple images, multiple galleries, slideshows, as a site&#8217;s background, in a &#8220;dialog&#8221; mode or as a common pop-up.</p>
<p>    jbgallery has two basic menus: the first one has music player buttons while the other one links  directly to single images.<br />
    I added a &#8220;complex&#8221; menu on the 2.0 version, which is inspired by the <a href="http://www.flickr.com/search/show/?q=assisi" class="blank">flickr</a> slider-equipped slideshow that allows to scroll the thumbnail previews.<br />
    jbgallery provides a pubblic API to remote control the component, so it would be easier to bind also with a more complex menu.</p>
<p>    Examples:
    </p>
<ul>
<li>Option &#8220;fullscreen&#8221; &#8211; default true (jQuery UI resizable only for test):
<ul>
<li><a href="/scripts/jbgallery/docs/jbox/test_jbox.html" class="blank">box gallery</a> <strong>(NEW option! fullscreen : false)</strong></li>
<li><a href="/scripts/jbgallery/docs/jbox/test_jbox_multi.html" class="blank">multi box gallery</a> <strong>(NEW option! fullscreen : false)</strong></li>
</ul>
</li>
<li>Option &#8220;style&#8221; &#8211; default &#8220;centered&#8221;:
<ul>
<li><a href="/scripts/jbgallery/docs/background/centered.html" class="blank">centered</a> <strong>(default)</strong></li>
<li><a href="/scripts/jbgallery/docs/background/zoom.html" class="blank">zoom</a></li>
<li><a href="/scripts/jbgallery/docs/background/original.html" class="blank">original</a></li>
</ul>
</li>
<li>Option &#8220;menu&#8221; &#8211; default &#8220;simple&#8221;:
<ul>
<li><a href="/scripts/jbgallery/docs/menusimple/simple.html" class="blank">simple</a> <strong>(default)</strong></li>
<li><a href="/scripts/jbgallery/docs/menuslider/menuslider.html" class="blank">slider</a></li>
<li><a href="/scripts/jbgallery/docs/menunumbers/centered.html" class="blank">numbers</a></li>
<li><a href="/scripts/jbgallery/docs/background/slideshow.html" class="blank">nothing</a> (slideshow true, use arrows)</li>
</ul>
</li>
<li>Option &#8220;caption&#8221; &#8211; default true:
<ul>
<li><a href="/scripts/jbgallery/docs/caption/caption.html" class="blank">caption</a> (see html markup)</li>
<li><a href="/scripts/jbgallery/docs/caption/caption.html" class="blank">no caption</a> (caption disabled)</li>
</ul>
</li>
<li>Option &#8220;timers&#8221;:
<ul>
<li><a href="/scripts/jbgallery/docs/options/interval.html" class="blank">interval</a></li>
<li><a href="/scripts/jbgallery/docs/options/nofade.html" class="blank">No fade effect</a> (menu simple)</li>
<li><a href="/scripts/jbgallery/docs/options/nofade2.html" class="blank">No fade effect</a> (menu slider)</li>
</ul>
</li>
<li>Option &#8220;autohide&#8221; &#8211; default false:
<ul>
<li><a href="/scripts/jbgallery/docs/options/autohide_ms.html" class="blank">autohide</a> (menu slider)</li>
<li><a href="/scripts/jbgallery/docs/options/autohide_mn.html" class="blank">autohide</a> (menu numbers)</li>
</ul>
</li>
<li>Option &#8220;randomize&#8221; &#8211; default 0:
<ul>
<li><a href="/scripts/jbgallery/docs/options/randomize.html" class="blank">randomize first image</a> &#8211; randomize : 1</li>
<li><a href="/scripts/jbgallery/docs/options/randomize_slideshow.html" class="blank">randomize slideshow</a> &#8211; randomize : 2</li>
</ul>
</li>
<li><a href="/scripts/jbgallery/docs/options/labels.html" class="blank">custom labels</a></li>
<li><a href="/scripts/jbgallery/docs/options/clickable.html" class="blank">clickable</a> &#8211; option clickable (default : false)</li>
<li><a href="/scripts/jbgallery/docs/debug/test.html" class="blank">Debug style</a> (debug style)</li>
<li>Option &#8220;popup&#8221; &#8211; default 0:
<ul>
<li><a href="/scripts/jbgallery/docs/multi/multi.html" class="blank">multiple gallery same page</a></li>
<li><a href="/scripts/jbgallery/docs/multi/popup_launcher.html" class="blank">&#8220;overlay&#8221; vs window.open</a> (see &#8220;permalink&#8221;)</li>
</ul>
</li>
<li>&#8220;Old Hack&#8221; &#8211; deprecated (use caption):
<ul>
<li><a href="/scripts/jbgallery/docs/advanced/links.html" class="blank">links over image</a></li>
</ul>
</li>
<li>API &amp; Advanced options for developers/designers:
<ul>
<li><a href="/scripts/jbgallery/docs/advanced/callback.html" class="blank">callback</a> (basic callback)</li>
<li><a href="/scripts/jbgallery/docs/advanced/api.html" class="blank">api</a> (menu slider)</li>
<li><a href="/scripts/jbgallery/docs/advanced/api_menunumbers.html" class="blank">api</a> (menu numbers)</li>
<li><a href="/scripts/jbgallery/docs/advanced/api_menusimple.html" class="blank">api</a> (menu simple)</li>
<li><a href="/scripts/jbgallery/docs/advanced/api_callback.html" class="blank">callback on push/pop/unshift/shift</a></li>
</ul>
</li>
<li>API demo (hundreds images push via yql &amp; picasa):
<ul>
<li><a href="/scripts/jbgallery/docs/advanced/push_hundreds_from_picasa_menuslider.html" class="blank">slider</a></li>
<li><a href="/scripts/jbgallery/docs/advanced/push_hundreds_from_picasa_menusimple.html" class="blank">simple</a></li>
<li><a href="/scripts/jbgallery/docs/advanced/push_hundreds_from_picasa_menunumbers.html" class="blank">numbers</a> &#8211; note the limitations of this menu</li>
<li><a href="/scripts/jbgallery/docs/advanced/push.html" class="blank">basic example of push</a></li>
</ul>
</li>
<li>ADAPTERS (picasa):
<ul>
<li><a href="/scripts/jbgallery/docs/adapters/picasa_api.html" class="blank">all album</a> &#8211; new version with api</li>
<li><a href="/scripts/jbgallery/docs/adapters/picasa_album_api.html" class="blank">filter by album</a> &#8211; new version with api</li>
<li><a href="/scripts/jbgallery/docs/adapters/picasa.html" class="blank">all album</a> &#8211; old version</li>
<li><a href="/scripts/jbgallery/docs/adapters/picasa-album.html" class="blank">filter by album</a> &#8211; old version</li>
</ul>
</li>
</ul>
<h2>Installation</h2>
<h3>Download and extract</h3>
<p><a href="/scripts/jbgallery/jbgallery-3.0.beta.zip">jbgallery-3.0.beta.zip</a></p>
<p>Download single files : </p>
<ul>
<li>jbgallery-3.0.js : <a href="/scripts/jbgallery/jbgallery-3.0.js" class="blank">source</a> | <a href="/scripts/jbgallery/jbgallery-3.0.min.js" class="blank">min</a></li>
<li><a href="/scripts/jbgallery/jbgallery-3.0.css" class="blank">jbgallery-3.0.css</a></li>
<li><a href="/scripts/jbgallery/img/ajax-loader.gif" class="blank">ajax-loader.gif</a></li>
<li><a href="/scripts/jbgallery/img/sprite.png" class="blank">sprite.png</a></li>
<li><a href="/scripts/jbgallery/img/opacity.png" class="blank">opacity.png</a></li>
<li><a href="/scripts/jbgallery/libs/jquery-1.4.4.min.js" class="blank">jquery-1.4.4.min.js</a></li>
</ul>
<p>Extra files : </p>
<ul>
<li>jbpicasa.js : <a href="/scripts/jbgallery/adapters/jbpicasa-3.0.js" class="blank">source</a> &#8211; new version.</li>
<li>jbpicasa.js : <a href="/scripts/jbgallery/adapters/jbpicasa.js" class="blank">source</a> &#8211; test adapter that you can use building an html structure, getting data from an external rss feed.</li>
</ul>
<h2>Usage</h2>
<h3>js and css (include in head tag)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;link href=&quot;jbgallery-3.0.css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.1.4.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jbgallery-3.0.js&quot;&gt;&lt;/script&gt;
</pre>
<h3>HTML structure (minimal menu)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;jbgallery&quot;&gt;
 &lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;1.jpg&quot; &gt;1&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;2.jpg&quot; &gt;2&lt;/a&gt;&lt;/li&gt;
  &lt;!-- etc --&gt;
 &lt;/ul&gt;
&lt;/div&gt;
</pre>
<h3>HTML structure (thumbnails &#8211; menu with slider)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;jbgallery&quot;&gt;
 &lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;big1.jpg&quot;&gt;&lt;img src=&quot;small1.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;big2.jpg&quot;&gt;&lt;img src=&quot;small2.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;!-- etc --&gt;
 &lt;/ul&gt;
&lt;/div&gt;
</pre>
<h3>HTML structure (caption)</h3>
<pre class="brush: xml; title: ; notranslate">[/html]
&lt;div class=&quot;jbgallery&quot;&gt;
 &lt;ul&gt;
  &lt;li&gt;
   &lt;a href=&quot;big.jpg&quot; title=&quot;Caption title&quot; rel=&quot;Caption title link&quot;&gt;&lt;img src=&quot;small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
   &lt;div class=&quot;caption&quot;&gt;Long long long text&lt;/div&gt;
  &lt;/li&gt;
  &lt;!-- etc --&gt;
 &lt;/ul&gt;
&lt;/div&gt;

1</pre>
<h3>JS</h3>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(document).ready(function(){
  jQuery(&quot;.jbgallery&quot;).jbgallery();
});
&lt;/script&gt;
</pre>
<h2>OPTIONS &amp; DEFAULTS</h2>
<p>Write options HERE : </p>
<pre class="brush: jscript; title: ; notranslate">
    jQuery('.jbgallery').jbgallery({HERE});
</pre>
<pre class="brush: jscript; title: ; notranslate">
{
  //option   : default value     //see docs/demo for usage - PLEASE FIX MY ENGLISH IF YOU CAN &amp;amp; SEND ME  (thanks!)
    style    : &quot;centered&quot;,       //&quot;centered&quot;|&quot;zoom&quot;|&quot;original&quot; - image style
    menu     : &quot;slider&quot;,         //false|&quot;numbers&quot;|&quot;simple&quot;|&quot;slider&quot; - menu type
    shortcuts: [37, 39],         //[prev,next] - keyboard code shortcuts
    slideshow: false,            //true|false - autostart slideshow
    fade     : true,             //true|false - disable all fade effects
    popup    : false,            //true|false - modal box &amp;amp; traditional popup hack to display multiple gallery (3.0 : fullscreen:false)
    randomize: 0,                //0|1|2 - randomize first image (1) or randomize &quot;slideshow&quot; (2) - blackout: http://www.grayhats.org
    caption  : true,             //true|false - show/disable internal caption system
    autohide : false,            //true|false - auto hide menu &amp;amp; caption
    clickable: false,            //true|false - &quot;image click &amp;amp; go&quot;
    current  : 1,                //number     - set initial photo (modal &quot;hack&quot; - see demo. don't use &quot;hash&quot;. jbgallery use &quot;location.hash&quot; only in popup mode)
    webkit   : (navigator.userAgent.toLowerCase().search(/webkit/) != -1),  //boolean - used for specific browser hack. if you want, you can force disable this flag &amp;amp; try to find crossbrowser solution
    ie6      : (/MSIE 6/i.test(navigator.userAgent)), //boolean - IDEM
    ie7      : (/MSIE 7/i.test(navigator.userAgent)), //boolean - IDEM
    labels   : {                 //labels of internal menu
        play : &quot;play&quot;,
        next : &quot;next&quot;,
        prev : &quot;prev&quot;,
        stop : &quot;stop&quot;,
        close: &quot;close&quot;,
        info : &quot;info&quot;
    },
    timers   : {                 //timers
        fade    : 400,           //fade duration
        interval: 7000,          //slideshow interval
        autohide: 7000           //autohide timeout
    },
    delays: {                    //delays (timers) to improve usability and reduce events
        mousemove: 200,          //used by autohide. cancel autohide timeout every XXXms.
        resize   : 500,          //used by ie6 to reduce events handled by window.resize
        mouseover: 800           //used by tooltip. show tooltip only if the mouse STAY over thumb for XXXms
    },
    close    : function(){},     //callback handled by menu's button close. see demo. example : close : function(){window.close()}
    before   : function(){},     //callback handled BEFORE image gallery loaded
    after    : function(ev){},   //callback(ev) handled AFTER image gallery loaded. receive the native load event.
    load     : function(ev){},   //callback(ev) handled AFTER native image load event. receive the native load event.
    ready    : function(el){},   //callback(el) handled AFTER jbgallery render. receive the HTML element.
    //WHAT'S NEW - 3.0
    fullscreen: true,            //true|false : the most important feature of jbgallery 3.0. now jbgallery can &quot;stay in a box&quot; and have multiple istance in one page.
    push      : function(o){},   //callback handled by push public method (JBGALLERY API). receive the object/string/array of objects/array of strings passed from external. useful for external menu system
    unshift   : function(o){},   //callback handled by unshift public method (JBGALLERY API). receive the object/string/array of objects/array of strings passed from external.
    shift     : function(){},    //callback handled by shift public method
    pop       : function(){},    //callback handled by pop public method
    empty     : function(){}     //callback handled by empty public method
}
</pre>
<h2>API (developers/designers)</h2>
<pre class="brush: jscript; title: ; notranslate">
var obj = jQuery(&quot;#jbg&quot;).jbgallery({menu : &quot;slider&quot;}, true);//GET API
obj.left();
obj.right();
obj.go(3);
obj.current();
obj.play(4000);
obj.stop();
obj.push(single);//single = 'http://url'
obj.push(aobj);//aobj is array of object
obj.unshift(obj);//obj is a single object
obj.unshift(arr);//arr is an array of string (url)
obj.shift();
obj.pop();
obj.empty();
obj.destroy();
</pre>
<h3>EXAMPLE</h3>
<pre class="brush: jscript; title: ; notranslate">
var images = {
    single : 'http://lh5.ggpht.com/_JJJpzXdPAI4/SpzvbyPhCHI/AAAAAAAAA-w/rf8dATWiOK8/100_2274.jpg',
    arr : ['http://lh3.ggpht.com/_JJJpzXdPAI4/SpzvrjvU83I/AAAAAAAABAU/8tbAipa9wgk/P1020533.jpg','http://lh5.ggpht.com/_JJJpzXdPAI4/SpzuSpC-0zI/AAAAAAAAA48/M2GPV81K4Ak/100_2090.jpg'],
    obj : {
        href : 'http://lh5.ggpht.com/_JJJpzXdPAI4/SpzvjOmg5-I/AAAAAAAAA_g/S8wow3zLays/P1020744.jpg',
        title: 'Hiroshima',
        rel  : 'http://en.wikipedia.org/wiki/Hiroshima',
        caption : 'Hiroshima (広島市, Hiroshima-shi?) (About this sound listen (help·info)) is the capital of Hiroshima Prefecture, and the largest city in the Chūgoku region of western Honshū',
        caption_css : 'custom'
    },
    aobj : [{
        href : 'http://lh5.ggpht.com/_JJJpzXdPAI4/SpzvjOmg5-I/AAAAAAAAA_g/S8wow3zLays/P1020744.jpg',
        thumb: 'http://lh5.ggpht.com/_JJJpzXdPAI4/SpzvjOmg5-I/AAAAAAAAA_g/S8wow3zLays/s288/P1020744.jpg',
        title: 'Hiroshima',
        rel  : 'http://en.wikipedia.org/wiki/Hiroshima',
        caption : 'Hiroshima (広島市, Hiroshima-shi?) (About this sound listen (help·info)) is the capital of Hiroshima Prefecture, and the largest city in the Chūgoku region of western Honshū',
        caption_css : 'custom'
    },{
        href : 'http://lh5.ggpht.com/_JJJpzXdPAI4/SpzvbyPhCHI/AAAAAAAAA-w/rf8dATWiOK8/100_2274.jpg',
        title: 'Magome-juku'
    }]
};
obj = jQuery(&quot;#jbgallery-api&quot;).jbgallery({menu : &quot;slider&quot;}, true);//GET API
jQuery(&quot;#mm-empty&quot;).click(function(){
    obj.empty();
});
jQuery(&quot;#mm-push&quot;).click(function(){
    obj.push(images.single);
});
jQuery(&quot;#mm-pushmany&quot;).click(function(){
    obj.push(images.aobj);
});
jQuery(&quot;#mm-shift&quot;).click(function(){
    obj.shift();
});
jQuery(&quot;#mm-pop&quot;).click(function(){
    obj.pop();
});
jQuery(&quot;#mm-unshift&quot;).click(function(){
    obj.unshift(images.obj);
});
jQuery(&quot;#mm-unshiftmany&quot;).click(function(){
    obj.unshift(images.arr);
});
</pre>
<h2>NOTES</h2>
<h3>BROWSERS TESTED</h3>
<ul>
<li>Firefox 3.6</li>
<li>Chrome 8,9</li>
<li>IE6,7,8,9</li>
<li>Opera</li>
<li>Safari</li>
</ul>
<h3>DESIGN</h3>
<p>
    This component is published with two graphic layout.</p>
<p>    You are free to customize css and to ask me any change to add classes to the menus edited by me.<br />
    If you use API or design more complex menus, or if you write plugins <del datetime="2010-12-19T18:37:54+00:00">populating html lists</del> <strong>pushing images</strong><br />
    (see <a href="/scripts/jbgallery/adapters/jbpicasa-3.0.js" class="blank">picasa 3.0 adapter</a>) via ajax by flickr<br />
    or similar services, please share with me for the next version of this plugin.
    </p>
<h3>CREDITS</h3>
<p>
        This work is inspired by <a href="http://www.ringvemedia.com/" class="blank">http://www.ringvemedia.com/</a> and <a href="http://www.chicchicken.cc/" class="blank">Chicca</a><br />
        The slider is inspired by <a href="http://www.flickr.com/search/show/?q=assisi" class="blank">http://www.flickr.com/search/show/</a><br />
        </p>
<p>        Depends on jQuery (1.4.4) by <a href="http://ejohn.org/" class="blank">John Resig</a>.<br />
        <br />
        Thanks to Carlo Denaro, Simone Parato, Aaron Hutten, Alain Bourgeoa, Steffen Wenzel
    </p>
<h2>CONTACTS</h2>
<p>
    Post a comment on this post. 
    </p>
<h3>LICENSE</h3>
<p>
    Copyright (c) 2010 Massimiliano Balestrieri</p>
<p>    Licensed GPL licenses:<br />
    <a href="http://www.gnu.org/licenses/gpl.html" class="blank">http://www.gnu.org/licenses/gpl.html</a>
    </p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2010/12/19/jbgallery-3-0/feed/</wfw:commentRss>
		<slash:comments>143</slash:comments>
		</item>
		<item>
		<title>jbgallery 2.0</title>
		<link>http://maxb.net/blog/2010/03/29/jbgallery-2-0/</link>
		<comments>http://maxb.net/blog/2010/03/29/jbgallery-2-0/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 14:48:42 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jbgallery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=616</guid>
		<description><![CDATA[ATTENTION : jbgallery 3.0 BETA DEMO SITE &#8211; (UPDATED 2010-12-20) jbgallery is a UI widget webpage written in javascript on top of the jQuery library. Its function is to show a single big image, multiple images, multiple galleries, slideshows, as &#8230; <a href="http://maxb.net/blog/2010/03/29/jbgallery-2-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;font-weight:bold;border:3px dashed red;padding:5px;">
ATTENTION : <a href="http://maxb.net/blog/2010/12/19/jbgallery-3-0/">jbgallery 3.0 BETA</a>
</div>
<p><a href="/scripts/old/jbgallery-2.0/" target="_blank">DEMO SITE</a> &#8211; <strong>(UPDATED 2010-12-20)</strong></p>
<p>
   jbgallery is a UI widget webpage written in javascript on top of the jQuery library.<br />
    Its function is to show a single big image, multiple images, multiple galleries, slideshows, as a site&#8217;s background, in a &#8220;dialog&#8221; mode or as a common pop-up.<br />
    jbgallery has two basic menus: the first one has music player buttons while the other one links  directly to single images.<br />
    I added a &#8220;complex&#8221; menu on the 2.0 version, which in inspired by the <a href="http://www.flickr.com/search/show/?q=assisi" class="blank">flickr</a> slider-equipped slideshow that allows to scroll the thumbnail previews.<br />
    jbgallery provides a pubblic API to remote control the component, so it would be easier to bind also with a more complex menu.</p>
<p>    Examples:
    </p>
<ul>
<li>Option &#8220;style&#8221;:
<ul>
<li><a href="/scripts/old/jbgallery-2.0/docs/centered.html" class="blank">centered</a> (default)</li>
<li><a href="/scripts/old/jbgallery-2.0/docs/zoom.html" class="blank">zoom</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/original.html" class="blank">original</a> (NEW : 2010-09-01)</li>
</ul>
</li>
<li>Option &#8220;menu&#8221;:
<ul>
<li><a href="/scripts/old/jbgallery-2.0/docs/menuslider.html" class="blank">slider</a> (default) *NEW</li>
<li><a href="/scripts/old/jbgallery-2.0/docs/numbers.html" class="blank">numbers</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/simple.html" class="blank">simple</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/nomenu.html" class="blank">nothing</a> (slideshow true, use arrows)</li>
</ul>
</li>
<li><a href="/scripts/old/jbgallery-2.0/docs/background.html" class="blank">Single image background</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/bgcentered.html" class="blank">Single image centered</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/multi.html" class="blank">Multi &#8220;fullscreen lightbox&#8221; gallery (2010-12-15 &#8211; update)</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/randomize.html" class="blank">Randomize first image (2010-12-15 &#8211; update)</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/randomize_slideshow.html" class="blank">Randomize slideshow (2010-12-15 &#8211; update)</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/popup_launcher.html" class="blank">&#8220;Fullscreen lightbox&#8221; vs Traditional popup  (2010-12-15 &#8211; update)</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/labels.html" class="blank">Custom labels</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/nofade.html" class="blank">No fade effect</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/nofade2.html" class="blank">No fade effect</a> (slider)</li>
<li><a href="/scripts/old/jbgallery-2.0/docs/interval.html" class="blank">Timers: interval</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/autohide.html" class="blank">Timers: autohide</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/callback.html" class="blank">Callback for developers</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/api.html" class="blank">Api for designer/developers</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/click.html" class="blank">Clickable</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/picasa.html" class="blank">Picasa adapter (NEW)</a></li>
<li><a href="/scripts/old/jbgallery-2.0/docs/picasa-album.html" class="blank">Picasa adapter (NEW)</a> (album)</li>
<li><a href="/scripts/old/jbgallery-2.0/docs/style_test.html" class="blank">Style test</a></li>
</ul>
<h2>Installation</h2>
<h3>Download and extract</h3>
<p><a href="/scripts/old/jbgallery-2.0/jbgallery-2.0.zip">jbgallery-2.0.zip</a> (<strong>update: 2010-12-20</strong>)</p>
<p>Download single files : </p>
<ul>
<li>jbgallery-2.0.js : <a href="/scripts/old/jbgallery-2.0/jbgallery-2.0.js" class="blank">source</a> | <a href="/scripts/old/jbgallery-2.0/jbgallery-2.0.min.js" class="blank">min</a></li>
<li><a href="/scripts/old/jbgallery-2.0/jbgallery-2.0.css" class="blank">jbgallery-2.0.css</a></li>
<li><a href="/scripts/old/jbgallery-2.0/ajax-loader.gif" class="blank">ajax-loader.gif</a></li>
<li><a href="/scripts/old/jbgallery-2.0/sprite.png" class="blank">sprite.png</a></li>
<li><a href="/scripts/old/jbgallery-2.0/jquery-1.4.2.min.js" class="blank">jquery-1.4.2.min.js</a></li>
</ul>
<p>Extra files : </p>
<ul>
<li>jbpicasa.js : <a href="/scripts/old/jbgallery-2.0/adapters/jbpicasa.js" class="blank">source</a> &#8211; test adapter that you can use building an html structure, getting data from an external rss feed.</li>
</ul>
<h3>js and css (include in head tag)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;link href=&quot;jbgallery-2.0.css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.1.4.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jbgallery-2.0.js&quot;&gt;&lt;/script&gt;
</pre>
<h3>HTML structure (minimal menu)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;jbgallery&quot;&gt;
 &lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;1.jpg&quot; &gt;1&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;2.jpg&quot; &gt;2&lt;/a&gt;&lt;/li&gt;
  &lt;!-- etc --&gt;
 &lt;/ul&gt;
&lt;/div&gt;
</pre>
<h3>HTML structure (thumbnails &#8211; menu with slider)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;jbgallery&quot;&gt;
 &lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;big1.jpg&quot;&gt;&lt;img src=&quot;small1.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;big2.jpg&quot;&gt;&lt;img src=&quot;small2.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;!-- etc --&gt;
 &lt;/ul&gt;
&lt;/div&gt;
</pre>
<h3>HTML structure (caption)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;jbgallery&quot;&gt;
 &lt;ul&gt;
  &lt;li&gt;
   &lt;a href=&quot;big.jpg&quot; title=&quot;Caption title&quot;&gt;&lt;img src=&quot;small.jpg&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;
   &lt;div class=&quot;caption&quot;&gt;Long long long text&lt;/div&gt;
  &lt;/li&gt;
  &lt;!-- etc --&gt;
 &lt;/ul&gt;
&lt;/div&gt;
</pre>
<h3>JS</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(document).ready(function(){
  jQuery(&quot;.jbgallery&quot;).jbgallery();
});
&lt;/script&gt;
</pre>
<h2>OPTIONS &amp; DEFAULTS</h2>
<p>Write options HERE : </p>
<pre class="brush: jscript; title: ; notranslate">
 jQuery(&quot;.jbgallery&quot;).jbgallery({HERE});
</pre>
<div class="code">
    jQuery(&#8220;.jbgallery&#8221;).jbgallery({HERE});
</div>
<h3>DEFAULTS</h3>
<pre class="brush: jscript; title: ; notranslate">
{
  style     : &quot;centered&quot;,//centered, zoom, original
  menu      : 'slider', //false, numbers, simple, slider
  shortcuts : [37,39],
  slideshow : false,
  fade      : true,
  popup     : false,
  caption   : true,  //NEW 2.0
  autohide  : false, //NEW 2.0
  clickable : false, //NEW 2.0
  current   : 1,   //NEW 2.0
  randomize : 0,   //NEW 2.0
  webkit    : (navigator.userAgent.toLowerCase().search(/webkit/) != -1),
  ie6       : (/MSIE 6/i.test(navigator.userAgent)),
  ie7       : (/MSIE 7/i.test(navigator.userAgent)),
  labels    : {
    play : &quot;play&quot;,
    next : &quot;next&quot;,
    prev : &quot;prev&quot;,
    stop : &quot;stop&quot;,
    close: &quot;close&quot;,
    info : &quot;info&quot;
  },
  timers    : {
    fade      : 400,
    interval  : 7000,
    autohide  : 7000
  },
  delays    : {
    mousemove : 200,
    resize    : 500,
    mouseover : 800
  },
  close     : function(){},
  before    : function(){},
  after     : function(ev){},
  load      : function(ev){},
  ready      : function(){}
}
</pre>
<h3>OPTIONS</h3>
<ul>
<li>style : string (&#8216;zoom&#8217;/'centered&#8217;/'original&#8217;)</li>
<li>slideshow : boolean (true/false)</li>
<li>menu  : string/boolean (&#8216;slider&#8217;/'simple&#8217;/'numbers&#8217;/false)</li>
<li>caption : boolean (show info button in menu &#8211; NEW)</li>
<li>autohide: boolean (autohide interface &#8211; NEW)</li>
<li>clickable: boolean (NEW)</li>
<li>current: number (set the initial photo NEW)</li>
<li>randomize : numeric (0/1/2 &#8211; NEW &#8211; 0 default | 1 randomize first image | 2 randomize slidshow/prev/next &#8211; thanks to Carlo Denaro &#8211; blackout: http://www.grayhats.org)</li>
<li>fade  : boolean (false/true)</li>
<li>shortcuts : array (keycodes for trigger events left/right via keyboard)</li>
<li>before: function (callback)</li>
<li>load  : function(ev) (callback &#8211; native image load event)</li>
<li>after : function (callback)</li>
<li>ready : function (callback &#8211; interface ready)</li>
<li>popup : boolean (show close button)</li>
<li>close : function(ev) (callback after click close button. i.e. window.close())</li>
<li>labels: object &#8211; default:
<pre class="brush: jscript; title: ; notranslate">
{
   play : &quot;play&quot;,
   next : &quot;next&quot;,
   prev : &quot;prev&quot;,
   stop : &quot;stop&quot;,
   close: &quot;close&quot;,
   info : &quot;info&quot;
}
</pre>
</li>
<li>timers: object &#8211; default:
<pre class="brush: jscript; title: ; notranslate">
{
  fade      : 400,  //fadeIn-Out timer
  interval  : 7000, //slideshow timer
  autohide  : 7000  //autohide timer
}
</pre>
</li>
<li>delays: object &#8211; default:
<pre class="brush: jscript; title: ; notranslate">
{
  mousemove : 200,
  resize    : 500,
  mouseover : 800
}
</pre>
</li>
</ul>
<h3>API (developers/designers)</h3>
<ul>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(); // build object FIRST</li>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(&#8220;go&#8221; , 2); // go to photo 2 if exist </li>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(&#8220;left&#8221;); // prev photo </li>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(&#8220;right&#8221;); // next photo </li>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(&#8220;play&#8221;); // autoplay start </li>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(&#8220;stop&#8221;); // autoplay stop</li>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(&#8220;destroy&#8221;); // destroy object, events, expando</li>
<li>jQuery(&#8220;#jbgallery&#8221;).jbgallery(&#8220;current&#8221;); // return number of current photo</li>
</ul>
<h2>CONTENTS/FURTHER ELEMENTS</h2>
<p>
    To add to the image further contents or other kind of elements you can use the following div. Otherwise you can add other divs copying the styles below.
    </p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;jbg-content&quot;&gt;
    &lt;!-- PUT HERE CONTENT --&gt;
    &lt;div id=&quot;docs&quot;&gt;
        &lt;div class=&quot;wrapper&quot;&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;!-- /PUT HERE CONTENT --&gt;
&lt;/div&gt;
</pre>
<pre class="brush: css; title: ; notranslate">
#docs{width:500px;right:200px;top:15%;position:absolute;z-index:1000;}
#docs .wrapper{padding:10px;margin:10px;background:#fff;}
</pre>
<h2>BROWSERS TESTED</h2>
<ul>
<li>Firefox 3.5 (winxp/linux)</li>
<li>Safari 3.2, 4 (winxp)</li>
<li>Chrome/Chromium  (winxp/linux)</li>
<li>Opera 9/10/11 (winxp/linux)</li>
<li>Internet Explorer 6/7/8 (winxp)</li>
</ul>
<h2>DESIGN/GRAPHIC</h2>
<p>
    This component is published with a minimalist graphic layout.<br />
    You are free to customize css and to ask me any change to add classes to the simple menus edited by me.<br />
    If you use API or design more complex menus, or if you write plugins populating html lists via ajax by flickr<br />
    or similar services, please share with me for the next version of this plugin.
    </p>
<h2>CREDITS</h2>
<p>
        This work is inspired by <a href="http://www.ringvemedia.com/" class="blank">http://www.ringvemedia.com/</a> and <a href="http://www.chicchicken.cc/" class="blank">Chicca</a><br />
        The slider is inspired by <a href="http://www.flickr.com/search/show/?q=assisi" class="blank">http://www.flickr.com/search/show/</a><br />
        <br />
        Depends on jQuery (1.3.2/1.4.2) by <a href="http://ejohn.org/" class="blank">John Resig</a>.<br />
       <br />
        Thanks to <a href="http://www.grayhats.org/articles/34-opensource/144-intermediate-jbgallery-20-add-random-image-loading">Carlo Denaro</a>,  Simone Parato, Aaron Hutten, Alain Bourgeoa, Steffen Wenzel, krko.
    </p>
<h2>COMMENTS &amp; CONTACTS</h2>
<p>
    Post a comment on my blog. <br />
    <a href="http://maxb.net/blog/2010/03/29/jbgallery-2-0/">http://maxb.net/blog/</a>
    </p>
<h2>LICENSE</h2>
<p>
    Copyright (c) 2010 Massimiliano Balestrieri<br />
    Licensed GPL licenses:<br />
    <a href="http://www.gnu.org/licenses/gpl.html" class="blank">http://www.gnu.org/licenses/gpl.html</a>
    </p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2010/03/29/jbgallery-2-0/feed/</wfw:commentRss>
		<slash:comments>121</slash:comments>
		</item>
		<item>
		<title>jbgallery 2.0 – preview</title>
		<link>http://maxb.net/blog/2010/03/25/jbgallery-2-0-preview/</link>
		<comments>http://maxb.net/blog/2010/03/25/jbgallery-2-0-preview/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 16:26:09 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jbgallery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=595</guid>
		<description><![CDATA[DEMO]]></description>
			<content:encoded><![CDATA[<p><a href="http://maxb.net/scripts/old/jbgallery-2.0/docs/menuslider.html" target="_blank">DEMO</a></p>
<p style="text-align: center;"><a href="http://maxb.net/scripts/jbgallery-2.0/docs/menuslider.html" target="_blank"><img class="aligncenter size-full " title="jbgallery2" src="http://maxb.net/blog/wp-content/uploads/2010/03/jbgallery2.jpg" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2010/03/25/jbgallery-2-0-preview/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jbgallery – Immagini da Picasa/Flickr via YQL</title>
		<link>http://maxb.net/blog/2010/03/18/jbgallery-immagini-da-picasaflickr-via-yql/</link>
		<comments>http://maxb.net/blog/2010/03/18/jbgallery-immagini-da-picasaflickr-via-yql/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 14:40:10 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jbgallery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[yql]]></category>
		<category><![CDATA[flikr]]></category>
		<category><![CDATA[picasa]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=581</guid>
		<description><![CDATA[DEMO PICASA FLICKR Pubblico due snippets di codice, per popolare jbgallery via Flickr o Picasa. Il vantaggio è avere a &#8220;costo zero&#8221; un backoffice per la gestione della galleria. ISTRUZIONI PER L&#8217;USO Includere gli script e il markup della demo, &#8230; <a href="http://maxb.net/blog/2010/03/18/jbgallery-immagini-da-picasaflickr-via-yql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>DEMO</h3>
<ul>
<li><a href="http://maxb.net/scripts/old/jbgallery-1.0/docs/picasa.html" target="_blank">PICASA</a></li>
<li><a href="http://maxb.net/scripts/old/jbgallery-1.0/docs/flickr.html" target="_blank">FLICKR</a></li>
</ul>
<p>Pubblico due snippets di codice, per popolare  <a href="http://maxb.net/blog/2009/03/30/jbgallery-10/" target="_blank">jbgallery</a> via Flickr o Picasa.<br />
Il vantaggio è avere a &#8220;costo zero&#8221; un backoffice per la gestione della galleria.</p>
<h3>ISTRUZIONI PER L&#8217;USO</h3>
<p>Includere gli script e il markup della demo, e configurare le variabili.</p>
<h4>PICASA</h4>
<pre class="brush: jscript; title: ; notranslate">
var _n_albums = 10;
var _account = 'massimiliano.balestrieri';
var _filter_album = 'Japan2009009Persone';//false
</pre>
<p>Per Picasa configurare l&#8217;account, il numero di album da cui prendere le immagini, e l&#8217;eventuale filtro (impostato a false non ci sarà filtro) per visualizzare un solo album.</p>
<h4>FLICKR</h4>
<pre class="brush: jscript; title: ; notranslate">
var _photoset = '72157619533884851';
</pre>
<p>Per Flickr configurare il &#8220;photoset&#8221;*.</p>
<p><small>*<a href="http://www.flickr.com/photos/chiccafake/" target="_blank">Foto di Chicca Vancini</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2010/03/18/jbgallery-immagini-da-picasaflickr-via-yql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>comodoclick</title>
		<link>http://maxb.net/blog/2009/05/12/comodoclick/</link>
		<comments>http://maxb.net/blog/2009/05/12/comodoclick/#comments</comments>
		<pubDate>Tue, 12 May 2009 08:48:01 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=376</guid>
		<description><![CDATA[LINKS: Demo Js FUNZIONALITA&#8217;: Aggiunge la classe &#8220;hover&#8221; ai td di una certa riga di tabella (tr > td) sull&#8217;evento hover del tr Aggiunge la classe &#8220;selected&#8221; ai td di una certa riga di tabella (tr > td) sull&#8217;evento click &#8230; <a href="http://maxb.net/blog/2009/05/12/comodoclick/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>LINKS:</h3>
<ul>
<li><a href="http://maxb.net/scripts/comodoclick/" target="_blank">Demo</a></li>
<li><a href="http://maxb.net/scripts/comodoclick/comodoclick.js" target="_blank">Js</a></li>
</ul>
<h3>FUNZIONALITA&#8217;:</h3>
<ul>
<li>Aggiunge la classe &#8220;hover&#8221; ai td di una certa riga di tabella (tr > td) sull&#8217;evento hover del tr</li>
<li>Aggiunge la classe &#8220;selected&#8221; ai td di una certa riga di tabella (tr > td) sull&#8217;evento click del td</li>
<li>Aggiunge la classe &#8220;selected&#8221; ai td di una certa riga di tabella al click sui controlli form checkbox e radio (di conseguenza anche al click sulle label) presenti sulla riga stessa</li>
<li>Nel caso di input:radio la classe selected viene prima cancellata dalle altre righe e poi applicata alla riga &#8220;selezionata&#8221;</li>
</ul>
<h3>AUTOLOAD</h3>
<p>Per attivarlo basta includere gli scripts (jquery, comodoclick) e aggiungere la classe comodoclick ad una tabella.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script src=&quot;jquery-1.3.2.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;comodoclick.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;table class=&quot;comodoclick&quot;&gt;
</pre>
<h3>CSS</h3>
<p>Personalizzare a piacere queste classi css:</p>
<pre class="brush: css; title: ; notranslate">
table.comodoclick tr td.hover {background-color:red;}
table.comodoclick tr td.selected {background-color:green;}
</pre>
<h3>CODE</h3>
<p>Il plugin con qualche nota:</p>
<pre class="brush: jscript; title: ; notranslate">
/*
 * Copyright (c) 2008 Massimiliano Balestrieri
 *
 * @requires jQuery v1.3.2
 *
 * Copyright (c) 2008 Massimiliano Balestrieri
 * Examples and docs at: http://maxb.net/blog/
 * Licensed GPL licenses:
 * http://www.gnu.org/licenses/gpl.html
 */
;
(function($){

    function ComodoClick(){
        return this.each(function(){
            var that = this;

            jQuery(&quot;tr&quot;, this).hover(function(){
                jQuery(&quot;td&quot;, this).addClass(&quot;hover&quot;);
            }, function(){
                jQuery(&quot;td&quot;, this).removeClass(&quot;hover&quot;);
            });

            jQuery(&quot;tr&quot;, this).click(function(e){
                var _target = e.target || e.srcElement;
                var _tag = _target.tagName.toString().toLowerCase();
                //prendo solo il click sul td
                //se ci fossero tag di tipo blocco dentro il td sarebbe un problema
                //se invece clicco su una input o su una label gestisco tutto con l'evento -&gt; VEDI SOTTO
                if (_tag === 'td') {
                    var _tr = jQuery(this);
                    _highlight_row(_tr, true);
                }
                //return false;
            });

            //vedi sotto A
            jQuery(&quot;tr&quot;, this).find(&quot;input:checkbox, input:radio&quot;).bind(&quot;click&quot;, function(){
                var _tr = jQuery(this).parents(&quot;tr&quot;);
                _highlight_row(_tr, true);
            });
            //vedi sotto B
            jQuery(&quot;tr&quot;, this).find(&quot;input:checkbox&quot;).bind(&quot;checked&quot;, function(){
                var _tr = jQuery(this).parents(&quot;tr&quot;);
                _highlight_row(_tr, false);
            });

            var _highlight_row = function(_tr, flag){
                //il flag è per selezionare la checkbox/radio forzatamente
                //checkbox gestisce la &quot;multiselezione&quot;

                var _checkbox = jQuery(&quot;input:checkbox&quot;, _tr).length &gt; 0;

                //nel caso dei radio cancello le altre colorazioni
                if (!_checkbox) {
                    jQuery(&quot;td&quot;, that).removeClass(&quot;selected&quot;);
                    jQuery(&quot;tr&quot;, that).removeClass(&quot;selected&quot;);
                    jQuery(&quot;td&quot;, _tr).addClass(&quot;selected&quot;);
                    _tr.addClass(&quot;selected&quot;);

                    if (flag) {
                        jQuery(&quot;input:radio&quot;, _tr).attr(&quot;checked&quot;, &quot;checked&quot;);
                    }

                }
                else {
                    var _selected = _tr.is(&quot;.selected&quot;);
                    if (_selected) {
                        jQuery(&quot;td&quot;, _tr).removeClass(&quot;selected&quot;);
                        _tr.removeClass(&quot;selected&quot;);
                        jQuery(&quot;input:checkbox&quot;, _tr).attr(&quot;checked&quot;, &quot;&quot;);
                    }
                    else {
                        jQuery(&quot;td&quot;, _tr).addClass(&quot;selected&quot;);
                        _tr.addClass(&quot;selected&quot;);
                        jQuery(&quot;input:checkbox&quot;, _tr).attr(&quot;checked&quot;, &quot;checked&quot;);
                    }
                }

            };

            //A: triggero click per colorare la riga
            jQuery(&quot;input:radio:checked&quot;, that).trigger(&quot;click&quot;);
            //B: triggero checked -&gt; se usassi il click la checkbox si deselezionerebbe
            jQuery(&quot;input:checkbox:checked&quot;, that).trigger(&quot;checked&quot;);

        });
    }
	$.fn.comodoclick = ComodoClick;

	//AUTOLOAD
	$(document).ready(function(){
		$('table.comodoclick').comodoclick();
	});
})(jQuery);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2009/05/12/comodoclick/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>jbgallery 1.0</title>
		<link>http://maxb.net/blog/2009/03/30/jbgallery-10/</link>
		<comments>http://maxb.net/blog/2009/03/30/jbgallery-10/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 12:18:30 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jbgallery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=272</guid>
		<description><![CDATA[ATTENTION : jbgallery 3.0 BETA DEMO SITE jbgallery is a webpage UI widget written in javascript on top of the jQuery library. Its function is to show a single big image, multiple images, multiple gallery, slideshow, as site&#8217;s background or &#8230; <a href="http://maxb.net/blog/2009/03/30/jbgallery-10/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div style="text-align:center;font-weight:bold;border:3px dashed red;padding:5px;">
ATTENTION : <a href="http://maxb.net/blog/2010/12/19/jbgallery-3-0/">jbgallery 3.0 BETA</a>
</div>
<p><a href="/scripts/old/jbgallery-1.0/" target="_blank">DEMO SITE</a></p>
<p>
    jbgallery is a webpage UI widget written in javascript on top of the jQuery library.<br />
    Its function is to show a single big image, multiple images, multiple gallery, slideshow, as site&#8217;s background or in &#8220;dialog&#8221; mode or as a common pop-up<br />
    jbgallery has two basic menus, one has music player buttons the other gives directly links to single images. <br />
    jbgallery provides a pubblic API to remote control the component, so it would be easier to bind also with a more complex menu (i.e. with thumbnails).</p>
<p>    Examples:
    </p>
<ul>
<li><a href="/scripts/old/jbgallery-1.0/docs/base.html" target="_blank">Default</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/centered.html" target="_blank">Image centered</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/background.html" target="_blank">Simple background</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/bgslideshow.html" target="_blank">Background slideshow</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/multi.html" target="_blank">Modal Multi gallery</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/popup_launcher.html" target="_blank">Modal vs simple popup</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/numbers.html" target="_blank">Menu with numbers</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/labels.html" target="_blank">Custom labels</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/nofade.html" target="_blank">No fade effect</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/test_ie.html" target="_blank">Test for ie</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/interval.html" target="_blank">Interval (slideshow)</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/callback.html" target="_blank">Callback for developer</a></li>
<li><a href="/scripts/old/jbgallery-1.0/docs/api.html" target="_blank">Api</a></li>
</ul>
<h2>Installation</h2>
<h3>Download and extract</h3>
<p><a href="/scripts/old/jbgallery-1.0/jbgallery-1.0.zip">jbgallery-1.0.zip</a></p>
<p>Or download single files : </p>
<ul>
<li>jbgallery-1.0.js : <a href="/scripts/old/jbgallery-1.0/jbgallery-1.0.js"  target="_blank">source</a> | <a href="/scripts/old/jbgallery-1.0/jbgallery-1.0.min.js"  target="_blank">min</a> | <a href="/scripts/old/jbgallery-1.0/jbgallery-1.0.pack.js"  target="_blank">packed</a></li>
<li><a href="/scripts/old/jbgallery-1.0/jbgallery.css"  target="_blank">jbgallery.css</a></li>
<li><a href="/scripts/old/jbgallery-1.0/ajax-loader.gif"  target="_blank">ajax-loader.gif</a></li>
<li><a href="/scripts/old/jbgallery-1.0/jquery-1.3.2.min.js"  target="_blank">jquery-1.3.2.min.js</a></li>
</ul>
<h3>Scripts js (include in head tag)</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.1.3.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;jbgallery-1.0.min.js&quot;&gt;&lt;/script&gt;
</pre>
<h3>HTML structure</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;jbgallery&quot;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;1.jpg&quot; title=&quot;alternative text&quot;&gt;1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;2.jpg&quot; title=&quot;alternative text&quot;&gt;2&lt;/a&gt;&lt;/li&gt;
    &lt;!-- etc --&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</pre>
<h3>JS</h3>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
jQuery(window).jbgcss(&quot;jbgallery.css&quot;);//customize url
jQuery(document).ready(function(){
  jQuery(&quot;.jbgallery&quot;).jbgallery();
});
&lt;/script&gt;
</pre>
<h2>OPTIONS &amp; DEFAULTS</h2>
<p>Write options HERE : </p>
<p><code class="javascript"><br />
    jQuery(".jbgallery").jbgallery({HERE});<br />
[/code]</p>
<h3>DEFAULTS</h3>
<pre class="brush: jscript; title: ; notranslate">
{
  style     :  &quot;zoom&quot;,    //&quot;centered&quot;, &quot;zoom&quot;
  slideshow :  false,
  menu      :  &quot;simple&quot;,  //false, &quot;numbers&quot;, &quot;simple&quot;
  interval  :  4000,
  fade      :  false,
  fade_time :  400,
  shortcuts :  [37,39],   //left and right arrows
  before    :  function(){}
  load      :  function(ev){},
  after     :  function(ev){},
  popup     :  false,
  close     :  function(ev){},
  labels    :  {
        play : &quot;play&quot;,
        next : &quot;next&quot;,
        prev : &quot;prev&quot;,
        stop : &quot;stop&quot;,
        close: &quot;close&quot;
  }
}
</pre>
<h3>OPTIONS</h3>
<ul>
<li>style : string ('zoom'/'centered')</li>
<li>slideshow : boolean (true/false)</li>
<li>menu : string/boolean ('simple'/'numbers'/false)</li>
<li>interval : number (milliseconds for slideshow)</li>
<li>fade : boolean (false/true)</li>
<li>fade_time : number (milliseconds for fadeIn/fadeOut effect)</li>
<li>shortcuts : array (keycodes for trigger events left/right via keyboard)</li>
<li>before : function (callback)</li>
<li>load : function(ev) (callback - native image load event)</li>
<li>after : function (callback)</li>
<li>popup : boolean (show close button)</li>
<li>close : function(ev) (callback after click close button. i.e. window.close())</li>
<li>labels: object - default:
<p>{<br />
   play : "play",<br />
   next : "next",<br />
   prev : "prev",<br />
   stop : "stop",<br />
   close: "close"<br />
}</li>
</ul>
<h3>API (developers/designers)</h3>
<ul>
<li>jQuery("#jbgallery").jbgallery(); // build object FIRST</li>
<li>jQuery("#jbgallery").jbgallery("go" , 2); // trigger event go, go to photo 2 if exist </li>
<li>jQuery("#jbgallery").jbgallery("left"); // trigger event left (prev) </li>
<li>jQuery("#jbgallery").jbgallery("right"); // trigger event right (next) </li>
<li>jQuery("#jbgallery").jbgallery("play"); // trigger event play - autoplay start </li>
<li>jQuery("#jbgallery").jbgallery("stop"); // trigger event stop - autoplay stop</li>
<li>jQuery("#jbgallery").jbgallery("destroy"); // destroy object, events, expando</li>
<li>jQuery("#jbgallery").jbgallery("current"); // return number of current photo</li>
</ul>
<h2>CONTENTS/FURTHER ELEMENTS</h2>
<p>
    To add to the image further contents or other kind of elements you can use the following div. Otherwise you can add other divs copying the styles below.
    </p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;jbg-content&quot;&gt;
    &lt;!-- PUT HERE CONTENT --&gt;
    &lt;div id=&quot;docs&quot;&gt;
        &lt;div class=&quot;wrapper&quot;&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;!-- /PUT HERE CONTENT --&gt;
&lt;/div&gt;
</pre>
<pre class="brush: css; title: ; notranslate">
#docs{width:500px;right:200px;top:15%;position:absolute;z-index:1000;}
#docs .wrapper{padding:10px;margin:10px;background:#fff;}
</pre>
<h2>BROWSERS TESTED</h2>
<ul>
<li>Firefox 3 (winxp/linux)</li>
<li>Safari 3.2, 4 (winxp)</li>
<li>Chrome 1/2 (winxp)</li>
<li>Opera 9.6/10 (winxp/linux)</li>
<li>Internet Explorer 6/7/8 (winxp)</li>
<li>Konqueror 4.2.1 (linux)</li>
</ul>
<h2>KNOWN BUGS</h2>
<h3>Opera</h3>
<p>
    I can't prevent on the keydown default event (arrows)  in Opera.<br />
    At "arrows" keydown that causes a pervers effect.<br />
    If you know a solution, please contact me. 
    </p>
<h2>DESIGN/GRAPHIC</h2>
<p>
    The component is published with a minimalist graphic layout.<br />
    You are free to customize css and to ask me any change to add classes to the simple menus edited by me.<br />
    If you use API or design more complex menus, or if you write plugins populating html lists via ajax by flickr<br />
    or similar services, please share with me for the next version of this plugin.
    </p>
<h2>CREDITS</h2>
<p>
        This work is inspired by <a href="http://www.ringvemedia.com/"  target="_blank">http://www.ringvemedia.com/</a> and <a href="http://www.chicchicken.cc/" target="_blank">Chicca</a><br />
        <br />
        Photos by <a href="http://www.flickr.com/photos/chiccafake/"  target="_blank">Chicca Vancini</a>.<br />
        Thanks to <a href="http://perassi.org"  target="_blank">Carlo</a>.<br />
        Depends by <a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js"  target="_blank">jquery-1.3.2</a> by <a href="http://ejohn.org/"  target="_blank">John Resig</a>.
    </p>
<h2>LICENSE</h2>
<p>
    Copyright (c) 2009 Massimiliano Balestrieri<br />
    Licensed GPL licenses:<br />
    <a href="http://maxb.net"  target="_blank">http://www.gnu.org/licenses/gpl.html</a>
    </p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2009/03/30/jbgallery-10/feed/</wfw:commentRss>
		<slash:comments>50</slash:comments>
		</item>
		<item>
		<title>YCodaSlider 3.0 – Changelog</title>
		<link>http://maxb.net/blog/2009/03/06/ycodaslider-30-changelog/</link>
		<comments>http://maxb.net/blog/2009/03/06/ycodaslider-30-changelog/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 10:00:09 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ycodaslider]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=236</guid>
		<description><![CDATA[updated to jquery 1.3.2 scrolltop: very important when &#8220;panels&#8221; have contents of different hights unstable piece of code have been delated: ycodaframe, history option dragging option and dependence from jQuery UI (basically unusefull) have been delated plugins in 2.0 (gallery, &#8230; <a href="http://maxb.net/blog/2009/03/06/ycodaslider-30-changelog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li>updated to <strong>jquery 1.3.2</strong></li>
<li><strong>scrolltop</strong>: very important when &#8220;panels&#8221; have contents of different hights</li>
<li>unstable piece of code have been delated: ycodaframe, history option</li>
<li>dragging option and dependence from jQuery UI (basically unusefull) have been delated</li>
</ul>
<ul>
<li>plugins in 2.0 (gallery, lazyload, feeds, code) now have been unified in a single file (easier to use. only 5KB the packed version. 9 KB the minified version)
<ul>
<li><span style="color: #000000;">jQuery</span><span style="color: #ff0000;"><span style="color: #000000;">(window).ycodacss ->to load the css.<br />
</span></span></li>
<li><span style="color: #000000;">jQuery(selector).ycodaslider -> to start up the component.</span></li>
<li><span style="color: #000000;">jQuery</span><span style="color: #000000;">(selector).ycodagallery -> prepares a list of images. To be used &#8220;in chain&#8221; with ycodaslider.</span></li>
<li><span style="color: #000000;">jQuery</span><span style="color: #000000;">(selector).ycodalazy -> starts up the lazyload on the list of images. To be used &#8220;in chain&#8221; with ycodagallery in event <strong>ready</strong>.  Launch ycodaslider on the event <strong>load</strong>.</span></li>
<li><span style="color: #000000;">jQuery</span><span style="color: #000000;">(selector).ycodacode -> prepares a list of links to sources, to be used &#8220;in chain&#8221; with ycodaslider. (optional jQuery Chili 2.2)<br />
</span></li>
<li><span style="color: #000000;">jQuery</span><span style="color: #000000;">(selector).ycodafeeds -> prepares a list of links to rss sources,  to be used &#8220;in chain&#8221; with ycodaslider. (needs  jQuery gFeeds e API google)</span></li>
</ul>
</li>
</ul>
<ul>
<li>I only kept separate the plugin fickr, which is just an example of how you can link ycodaslider
<ul>
<li><span style="color: #000000;">jQuery</span><span style="color: #000000;">(selector).ycodaflickr -> example of external component. (see also ycodagallery, ycodacode e ycodafeeds to write plugins for ycodaslider)</span></li>
</ul>
</li>
</ul>
<ul>
<li>jquery easing is no longer essential: jquery 1.3 has the swing effect as a default animation. Simply set at 0 the parameter easeTime if you don&#8217;t  want to have animation.</li>
<li>default keyboards shorcuts  are now the two arrows left &amp; right (keyboard codes are the same in all platforms)</li>
</ul>
<ul>
<li>I made a <strong>API using jquery UI style</strong>:
<ul>
<li>jQuery(selector).ycodaslider(&#8220;right&#8221;); -> invoke event right. ycodaslider will move right.</li>
<li>jQuery(selector).ycodaslider(&#8220;left&#8221;); -> invoke event left. ycodaslider will move left.</li>
<li>jQuery(selector).ycodaslider(&#8220;go&#8221;, N); -> invoke event go where N is the number of the panel to visualize (starting from 0)</li>
<li>jQuery(&#8220;#id&#8221;).ycodaslider(&#8220;currrent&#8221;); -> returns the panel active</li>
<li>jQuery(&#8220;#id&#8221;).ycodaslider(&#8220;count&#8221;); -> returns the number of panels</li>
<li>jQuery(&#8220;#id&#8221;).ycodaslider(&#8220;width&#8221;); -> returns the width of the component</li>
</ul>
</li>
<li>complete <strong>code refactory</strong></li>
<li>possibility of tracking click with janalytics plugin to have the statistics (google analytics)</li>
<li>a <strong>single css</strong> (easy to customize &#8211; <strong>the design of the demo has a minimalist design</strong>)</li>
<li><strong>easier to use</strong></li>
</ul>
<ul>
<li><strong>tested on the following browser:</strong>
<ul>
<li>firefox 3 (linux/windows xp)</li>
<li>internet explorer 6/7</li>
<li>chrome (windows xp)</li>
<li>safari 3.2.2/safari 4Beta (windows xp)</li>
<li>opera 9.6 (windows xp)</li>
</ul>
</li>
</ul>
<ul>
<li>known bugs
<ul>
<li>IE6: the last panel sometimes literally fall under the second last, leaving empty the last card</li>
</ul>
</li>
</ul>
<ul>
<li>All examples:
<ul>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/slider/1.html" target="_blank">EFFECTS<br />
</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/slider/2.html" target="_blank">API</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/slider/3.html" target="_blank">SHORTCUTS</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/slider/4.html" target="_blank">CHINABILITY</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/slider/5.html" target="_blank">DIMENSIONS</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/slider/6.html" target="_blank">NO MENU &amp; ARROWS</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/gallery/1.html" target="_blank">GALLERY</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/lazyload/1.html" target="_blank">LAZYLOAD</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/lazyload/2.html" target="_blank">LAZYLOAD EXPLANATION</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/feeds/1.html" target="_blank">FEED RSS</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/code/1.html" target="_blank">CODE</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/flickr/1.html" target="_blank">EXTERNAL PLUGIN &#8220;FLICKR&#8221;</a></li>
<li><strong><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/" target="_blank">DEMO SITE<br />
</a></strong></li>
</ul>
</li>
</ul>
<p>if  you have any suggestions, if you find a bug or you use the plugin, please leave a comment here.<br />
PS: <a href="http://perassi.org/" target="_blank">Carlo</a>&#8230; spero vada bene <img src='http://maxb.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>UPDATE 2008-03-09 :</p>
<ul>
<li>Autoplay &amp; play on click
<ul>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/lazyload/3.html" target="_blank">AUTOPLAY LAZYLOAD<br />
</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/slider/7.html" target="_blank">AUTOPLAY SLIDER<br />
</a></li>
<li><a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/docs/gallery/2.html" target="_blank">PLAY ON CLICK<br />
</a></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2009/03/06/ycodaslider-30-changelog/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>YCodaSlider 3.0</title>
		<link>http://maxb.net/blog/2009/03/05/ycodaslider-30/</link>
		<comments>http://maxb.net/blog/2009/03/05/ycodaslider-30/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 18:01:35 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[ycodaslider]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=231</guid>
		<description><![CDATA[DEMO SITE. Slider scripts are one of the common objects of newspaper &#38; portal websites. They are very useful as they help us present more content in a limited space. This script helps you present your content with a tabbed &#8230; <a href="http://maxb.net/blog/2009/03/05/ycodaslider-30/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a title="BETA SITE" href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/" target="_blank"><img src="/scripts/ycodaslider-2.0/include/icons/beta.gif" alt="" /></a> <a href="http://www.maxb.net/scripts/ycodaslider-3.0/demo/" target="_blank">DEMO SITE.</a></p>
<blockquote><p>Slider scripts are one of the common objects of newspaper &amp; portal websites.<br />
They are very useful as they help us present more content in a limited space.<br />
This script helps you present your content with a tabbed menu + previous-next buttons to switch between tabs.<br />
YCodaSlider 2.0 requires jQuery to run and you can use any type of content inside the slider like HTML, Flash, webpages etc.<br />
It can be configured easily to use different effects while changing the content.<br />
<strong><em>from :<br />
<a href="http://www.webresourcesdepot.com/coda-like-slider-ycodaslider-20">www.webresourcesdepot.com</a></em></strong></p></blockquote>
<p>Based on Gian Carlo Mingati&#8217;s slideViewer<br />
<a href="http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html">http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html</a></p>
<p>Based on Niall Doherty&#8217;s coda-slider<br />
<a href="http://www.ndoherty.com/coda-slider">http://www.ndoherty.com/coda-slider</a></p>
<p>Inspired by the clever folks at <a href="http://www.panic.com/coda">http://www.panic.com/coda</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2009/03/05/ycodaslider-30/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Dokuwiki + jQuery + UI + Autocomplete</title>
		<link>http://maxb.net/blog/2009/02/26/dokuwiki-jquery-ui-autocomplete/</link>
		<comments>http://maxb.net/blog/2009/02/26/dokuwiki-jquery-ui-autocomplete/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 15:35:07 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[dokuwiki]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=215</guid>
		<description><![CDATA[[[DOWNLOAD]] UPDATE 2009-02-27: patch /inc/plugincontroller.class.php ____ To use it, extract the tarball inside DokuWiki plugins directory /lib/plugins/ jQuery (1.3.1) jQuery Metadata jQuery Autocomplete jQuery UI (Core + Dialog) jQuery Tags* jQuery Discussion* jQuery Dialog Link* Requires: discussion tag pagelist *Alpha &#8230; <a href="http://maxb.net/blog/2009/02/26/dokuwiki-jquery-ui-autocomplete/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>[[<a href="http://maxb.net/scripts/dokuwiki/jquery_dokuwiki_plugins.tar.gz">DOWNLOAD</a>]]</p>
<p style="padding-left: 30px;"><strong>UPDATE 2009-02-27</strong>: patch /inc/plugincontroller.class.php</p>
<pre class="brush: php; title: ; notranslate">
function Doku_Plugin_Controller() {
   $this-&gt;_populateMasterList();
   sort($this-&gt;list_enabled);//ADD THIS LINE
}
</pre>
<p>____</p>
<p>To use it, extract the tarball inside DokuWiki plugins directory</p>
<p>/lib/plugins/</p>
<ul>
<li>jQuery (1.3.1)</li>
<li>jQuery Metadata</li>
<li>jQuery Autocomplete</li>
<li>jQuery UI (Core + Dialog)</li>
<li>jQuery Tags*</li>
<li>jQuery Discussion*</li>
<li>jQuery Dialog Link*</li>
</ul>
<p><strong>Requires</strong>:</p>
<ul>
<li>discussion</li>
<li>tag</li>
<li>pagelist</li>
</ul>
<p>*Alpha versions</p>
<p><strong>IMPORTANT:</strong></p>
<p>$conf['compress']    = 0;                //Strip whitespaces and comments from Styles and JavaScript? 1|0</p>
<h3>===== Discussion &amp; Tag (autocomplete) =====</h3>
<p><a href="http://maxb.net/blog/wp-content/uploads/2009/02/tags2.png"><img class="size-full wp-image-221" title="tags2" src="http://maxb.net/blog/wp-content/uploads/2009/02/tags2.png" alt="tags2" width="465" height="161" /></a></p>
<h3>===== Internal Link Dialog (autocomplete) =====</h3>
<p><img class="size-full wp-image-218" title="link2" src="http://maxb.net/blog/wp-content/uploads/2009/02/link2.png" alt="link2" width="746" height="462" /></p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2009/02/26/dokuwiki-jquery-ui-autocomplete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Imparare jQuery – 9 – jPaging – Step 5 : closure contesti e visibilità</title>
		<link>http://maxb.net/blog/2008/08/28/imparare-jquery-9-jpaging-step-5-closure-contesti-e-visibilita/</link>
		<comments>http://maxb.net/blog/2008/08/28/imparare-jquery-9-jpaging-step-5-closure-contesti-e-visibilita/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 14:17:57 +0000</pubDate>
		<dc:creator>Massimiliano Balestrieri</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[jpaging]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://maxb.net/blog/?p=129</guid>
		<description><![CDATA[post precedente : eventi indice tutorial Cerchiamo prima di proseguire di fare chiarezza sull&#8217;ambito delle variabili, e sulla visibilità delle variabili esterne alle closure degli eventi. Assegno fuori dal contesto degli eventi una variabile La userò solamente in questo esempio. &#8230; <a href="http://maxb.net/blog/2008/08/28/imparare-jquery-9-jpaging-step-5-closure-contesti-e-visibilita/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://maxb.net/blog/2008/08/28/imparare-jquery-8-jpaging-step-4-eventi/">post precedente : eventi</a></li>
<li><a href="http://maxb.net/blog/2008/06/30/imparare-jquery-4-jpaging-introduzione/">indice tutorial</a></li>
</ul>
<p>Cerchiamo prima di proseguire di fare chiarezza sull&#8217;ambito delle variabili, e sulla visibilità delle variabili esterne alle closure degli eventi.</p>
<p>Assegno fuori dal contesto degli eventi una variabile </p>
<pre class="brush: jscript; title: ; notranslate">
var _context = _page;
</pre>
<p>La userò solamente in questo esempio. Nei successivi post non ci sarà traccia di questo codice.</p>
<p>All&#8217;interno degli eventi di tutti i tasti<br />
subito dopo questo:</p>
<pre class="brush: jscript; title: ; notranslate">
var _id = parseInt(jQuery(this).text()) - 1;
</pre>
<p>inserisco questo piccolo snippet di codice:</p>
<pre class="brush: jscript; title: ; notranslate">
alert(&quot;Prima del click : &quot; + _context);
_context = (_id + 1);
alert(&quot;Dopo il click : &quot; + _context);
</pre>
<p><strong>Le variabili dichiarate fuori dall&#8217;evento sono visibili e possono essere modificate all&#8217;interno degli eventi.</strong></p>
<p><a href="http://maxb.net/scripts/jpaging/tutorial/step5.html" target="_blank">DEMO</a><br />
<a href="http://maxb.net/scripts/jpaging/tutorial/step5.js" target="_blank">SORGENTE</a></p>
<p>Ora pulendo il nostro codice incapperemo in un particolare bug da evitare quando lavoriamo all&#8217;interno delle closure.</p>
<p>Abbiamo la variabile _page. Usiamo direttamente quella.<br />
Cancellando ogni riferimento a _context. Lo snippet diventa</p>
<pre class="brush: jscript; title: ; notranslate">
var _page = 1;
//[...]
jQuery(&quot;.jp-handler&quot;)
.click(function(){
//[...]
    var _id = parseInt(jQuery(this).text()) - 1;
    alert(&quot;Prima del click : &quot; + _page);
    _page = (_id + 1);
    alert(&quot;Dopo il click : &quot; + _page);

    jQuery(&quot;.jp-toolbar&quot;)
    .eq(0)
    .find(&quot;.jp-handler&quot;)
    .eq(_id)
    .addClass(&quot;jp-active&quot;);

    jQuery(&quot;.jp-toolbar&quot;)
    .eq(1)
    .find(&quot;.jp-handler&quot;)
    .eq(_id)
    .addClass(&quot;jp-active&quot;);

    _jpages.eq(_id).show();

    var _page = _id + 1;
    if(_page != 1)
        jQuery(&quot;.prev&quot;).show();
    else
        jQuery(&quot;.prev&quot;).hide();

    if(_page != _pages)
        jQuery(&quot;.next&quot;).show();
    else
        jQuery(&quot;.next&quot;).hide();

    return false;
});
</pre>
<p><a href="http://maxb.net/scripts/jpaging/tutorial/step5bug.html" target="_blank">BUG</a><br />
<a href="http://maxb.net/scripts/jpaging/tutorial/step5bug.js" target="_blank">SORGENTE</a></p>
<p>Eseguendo il codice al click su uno dei tasti vedrete che _page risponde &#8220;undefined&#8221; negando in pratica quanto visto precendentemente con _context.</p>
<p>Questo perchè subito dopo dichiaro nell&#8217;ambito della closure <strong>var _page</strong>.</p>
<p><strong>Se io voglio leggere/scrivere una variabile fuori ambito posso farlo fintanto che nello stesso ambito non venga definita una variabile con lo stesso nome.</strong></p>
<p>Come vedrete a parte il primo alert non ci sono effetti perversi. La paginazione funziona.<br />
Per evitare comunque effetti perversi difficili da scovare correggiamo il codice.</p>
<p><strong><br />
Morale (o buona pratica) : all&#8217;interno delle closure non dichiarare variabili con lo stesso nome del ambito esterno.<br />
Questo &#8220;mascheramento&#8221; infatti può produrre effetti perversi.<br />
</strong></p>
<p>A questo punto, visto il funzionamento delle variabili fuori dalle closure, e visto il bug correggiamo il codice e cancelliamo l&#8217;inutile variabile _context del primo esempio, questa volta in maniera corretta eliminando il bug.</p>
<p><a href="http://maxb.net/scripts/jpaging/tutorial/step5b.html" target="_blank">CORREZIONE</a><br />
<a href="http://maxb.net/scripts/jpaging/tutorial/step5b.js" target="_blank">SORGENTE</a></p>
<p>All&#8217;interno delle closure tolgo</p>
<pre class="brush: jscript; title: ; notranslate">
var _page = _id + 1;
</pre>
<p>che non ha senso. Usiamo direttamente la variabile fuori closure che tanto deve valere l&#8217;indice _id + 1.</p>
<p>Tolta questa dichiarazione il nostro script funziona senza effetti perversi.</p>
<p>Abbiamo due contesti. </p>
<p>Il contesto del &#8220;main&#8221; che comunque non ha ambito globale essendo a sua volta all&#8217;interno della closure legata all&#8217;evento ready del documento.</p>
<p>E il contesto degli eventi sui tasti.</p>
<p>Il contesto dei tasti usa e scrive la variabile di ambito superiore del programma stesso (quello che ho chiamato il rozzo &#8220;main&#8221;).</p>
<p>Ora non ci rimane che creare un vero e proprio plugin jQuery.</p>
<p>[... continua]</p>
]]></content:encoded>
			<wfw:commentRss>http://maxb.net/blog/2008/08/28/imparare-jquery-9-jpaging-step-5-closure-contesti-e-visibilita/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

