<?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>Superdit.com &#187; JQuery</title>
	<atom:link href="http://superdit.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://superdit.com</link>
	<description>blogging, design, tech, and web</description>
	<lastBuildDate>Sat, 31 Mar 2012 20:40:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>20 JQuery Table Datagrid Plugins</title>
		<link>http://superdit.com/2012/01/18/20-jquery-table-datagrid-plugins/</link>
		<comments>http://superdit.com/2012/01/18/20-jquery-table-datagrid-plugins/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 02:01:50 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=9604</guid>
		<description><![CDATA[Datagrid is one of most common used in web design, sometimes it will taking a lot of time to designing table, like header, he zebra row, pagination, etc. In jquery there are a lot of ready to use plugin that I compiled in this post, although grid features will be supported in JQuery UI, maybe<a href="http://superdit.com/2012/01/18/20-jquery-table-datagrid-plugins/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Datagrid is one of most common used in web design, sometimes it will taking a lot of time to designing table, like header, he zebra row, pagination, etc. In jquery there are a lot of ready to use plugin that I compiled in this post, although grid features will be supported in JQuery UI, maybe is good to know some alternative, before JQuery UI grid came along.</p>
<h5>JQuery Accesible RIA Table</h5>
<p><img class="alignnone" src="http://i.minus.com/i9aVd3ONQvjmp.jpg" alt="" width="550" height="248" /><span id="more-9604"></span></p>
<p><a href="https://github.com/fnagel/jQuery-Accessible-RIA/wiki" target="_blank">visit</a> | <a href="http://fnagel.github.com/jQuery-Accessible-RIA/Table/" target="_blank">demo</a></p>
<h5>Flexigrid</h5>
<p><img class="alignnone" title="Flexigrid" src="http://i.minus.com/ibqBiqQHRuFTY1.jpg" alt="Flexigrid" width="550" height="256" /></p>
<p><a href="http://flexigrid.info/" target="_blank">visit</a></p>
<h5>jqGrid</h5>
<p><img class="alignnone" title="jqGrid" src="http://i.minus.com/ijz2qHQiBBcm0.jpg" alt="jqGrid" width="550" height="195" /></p>
<p><a href="http://www.trirand.net/default.aspx" target="_blank">visit</a> | <a href="http://www.trirand.net/demophp.aspx" target="_blank">demo</a></p>
<h5>inGrid</h5>
<p><img class="alignnone" title="inGrid" src="http://i.minus.com/ib19XO4KBHKa1.jpg" alt="inGrid" width="550" height="284" /></p>
<p><a href="http://reconstrukt.com/ingrid/" target="_blank">visit</a> | <a href="http://reconstrukt.com/ingrid/src/example1.html" target="_blank">demo</a></p>
<h5>tGrid</h5>
<p><img class="alignnone" src="http://i.minus.com/i1J3dCjlZ2Hau.jpg" alt="" width="550" height="200" /></p>
<p><a href="http://dreakmore.info/tgrid/" target="_blank">visit</a> | <a href="http://dreakmore.info/tgrid/demos/" target="_blank">demo</a></p>
<h5>Datatables</h5>
<p><img class="alignnone" title="Datatables" src="http://i.minus.com/id8lUZflQOV9L.jpg" alt="Datatables" width="550" height="228" /></p>
<p><a href="http://www.datatables.net/" target="_blank">visit</a> | <a href="http://www.datatables.net/examples/" target="_blank">demo</a></p>
<h5>jTPS</h5>
<p><img class="alignnone" title="jTPS" src="http://i.minus.com/ibxGTV25ZvoFib.jpg" alt="jTPS" width="550" height="155" /></p>
<p><a href="http://www.overset.com/2008/08/30/animated-sortable-datagrid-jquery-plugin-jtps/" target="_blank">visit</a></p>
<h5>jQuery Gridy</h5>
<p><img class="alignnone" src="http://i.minus.com/ibzxzlphll8Ms0.jpg" alt="" width="550" height="300" /></p>
<p><a href="http://www.wbotelhos.com/gridy/" target="_blank">visit</a></p>
<h5>GridNic</h5>
<p><img class="alignnone" title="GridNic" src="http://i.minus.com/ibk7qsJfJjIzZN.jpg" alt="" width="550" height="220" /></p>
<p><a href="http://www.nicblue.com/gridnic/" target="_blank">visit gridnic</a> | <a href="https://github.com/mleibman/SlickGrid/wiki" target="_blank">visit slickgrid</a></p>
<h5>Kendo UI Grid</h5>
<p><img class="alignnone" title="Kendo UI Grid" src="http://i.minus.com/ib08CYENw4xgl9.jpg" alt="Kendo UI Grid" width="550" height="353" /></p>
<p><a href="http://www.kendoui.com/" target="_blank">visit</a> | <a href="http://demos.kendoui.com/web/grid/index.html" target="_blank">demo</a></p>
<h5>jqxGrid</h5>
<p><img class="alignnone" title="jqxGrid" src="http://i.minus.com/ixtlkrJBL3KME.jpg" alt="jqxGrid" width="550" height="258" /></p>
<p><a href="http://www.jqwidgets.com/" target="_blank">visit</a> | <a href="http://www.jqwidgets.com/jquery-widgets-demo/#demos/jqxgrid/defaultfunctionality.htm" target="_blank">demo</a></p>
<h5>Pines Grid</h5>
<p><img class="alignnone" title="Pines Grid" src="http://i.minus.com/ibu4hxAlxdMuQw.jpg" alt="Pines Grid" width="550" height="284" /></p>
<p><a href="http://pinesframework.org/pgrid/" target="_blank">visit</a></p>
<h5>JQuery Magic Grid</h5>
<p><a href="http://boarsoft.com/javascript/grid/" target="_blank"><img class="alignnone" title="JQuery Magic Grid" src="http://i.minus.com/iOX2ZFlzbKV23.jpg" alt="JQuery Magic Grid" width="550" height="240" /></a></p>
<p><a href="http://boarsoft.com/" target="_blank">visit</a> | <a href="http://boarsoft.com/javascript/grid/" target="_blank">demo</a></p>
<h5>Editable Grid</h5>
<p><img class="alignnone" title="Editable Grid" src="http://i.minus.com/ibr6LN0IlQFjMV.jpg" alt="Editable Grid" width="550" height="215" /></p>
<p><a href="http://www.webismymind.be/editablegrid/" target="_blank">visit</a></p>
<h5>Sigma Grid</h5>
<p><img class="alignnone" title="Sigma Grid" src="http://i.minus.com/iR3Xjg6dDVAI5.jpg" alt="Sigma Grid" width="550" height="283" /></p>
<p><a href="http://www.sigmawidgets.com/products/sigma_grid2/" target="_blank">visit</a> | <a href="http://www.sigmawidgets.com/products/sigma_grid2/demos/example_master_details.html" target="_blank">demo</a></p>
<h5>Tablesorter</h5>
<p><img class="alignnone" title="Tablesorter" src="http://i.minus.com/ibzNNHGjXxoeMi.jpg" alt="Tablesorter" width="550" height="164" /></p>
<p><a href="http://tablesorter.com/docs/" target="_blank">visit</a></p>
<h5>Zentable</h5>
<p><img class="alignnone" title="Zentable" src="http://i.minus.com/ie2DrGhf0csYT.jpg" alt="Zentable" width="550" height="177" /></p>
<p><a href="http://www.zentense.com/zenweb/en/zentable" target="_blank">visit</a></p>
<h5>jqGridView</h5>
<p><img class="alignnone" title="jqGridView" src="http://i.minus.com/iKvjA3QKz35p9.jpg" alt="jqGridView" width="517" height="463" /></p>
<p><a href="http://sourceforge.net/projects/jqgridview/" target="_blank">visit</a></p>
<h5>OpenJS Grid</h5>
<p><img class="alignnone" title="OpenJS Grid" src="http://i.minus.com/ibargahrGIwYWm.jpg" alt="OpenJS Grid" width="550" height="222" /></p>
<p><a href="http://square-bracket.com/openjs" target="_blank">visit</a></p>
<h5>Compass Datagrid</h5>
<p><img class="alignnone" title="Compass Datagrid" src="http://i.minus.com/iFRE6T2NgpmNH.jpg" alt="Compass Datagrid" width="550" height="188" /></p>
<p><a href="http://www.compasswebpublisher.com/jquery/compass-datagrid" target="_blank">visit</a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2012/01/18/20-jquery-table-datagrid-plugins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JQuery CSS Animation and Rotate</title>
		<link>http://superdit.com/2011/12/11/jquery-css-animation-and-rotate/</link>
		<comments>http://superdit.com/2011/12/11/jquery-css-animation-and-rotate/#comments</comments>
		<pubDate>Sun, 11 Dec 2011 09:22:38 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[rotate]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=9498</guid>
		<description><![CDATA[In today post I try to do a little experiment with css animation, with jquery to generating css value on the fly. When this post created the this animation examples only works on firefox and chrome browser. In this short example I try to create a stack of images, on the default position each of<a href="http://superdit.com/2011/12/11/jquery-css-animation-and-rotate/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>In today post I try to do a little experiment with css animation, with jquery to generating css value on the fly. When this post created the this animation examples only works on firefox and chrome browser.</p>
<p><a title="JQuery CSS Animation and Rotate" href="http://superdit.com/2011/12/11/jquery-css-animation-and-rotate/"><img class="alignnone size-full wp-image-9501" title="css-rotate-animation-thumb" src="http://superdit.com/wp-content/uploads/2011/12/css-rotate-animation-thumb.jpg" alt="" width="550" height="200" /></a></p>
<p>In this short example I try to create a stack of images, on the default position each of images have a different angle, and rotating to the same angle in the same duration of time. Here I show all of the code.<span id="more-9498"></span></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;CSS Rotate And Animation&lt;/title&gt;
    &lt;script src=&quot;jquery-1.6.4.min.js&quot;&gt;&lt;/script&gt;
    &lt;script&gt;
    $(function() {
        var tot = $(&quot;.img_c&quot;).length;
        var stat = deg = 10;
        var rotate = &quot;&quot;;
        var frame, mozframe, webkitframe;
        $(&quot;img&quot;).each(function(index) {
            $(this).css({
                &quot;transform&quot;: &quot;rotate(&quot;+deg+&quot;deg)&quot;,
                &quot;-moz-transform&quot;: &quot;rotate(&quot;+deg+&quot;deg)&quot;,
                &quot;-webkit-transform&quot;: &quot;rotate(&quot;+deg+&quot;deg)&quot;,
                &quot;-o-transform&quot;: &quot;rotate(&quot;+deg+&quot;deg)&quot;
            });

            rotate = &quot;100% {&quot; +
                &quot;transform: rotate(360deg);&quot; +
                &quot;-moz-transform: rotate(360deg);&quot; +
                &quot;-webkit-transform: rotate(360deg);&quot; +
                &quot;-o-transform: rotate(360deg);&quot; +
                &quot;} &quot;;

            var imgclass = parseInt(index+1);
            frame = &quot; @keyframe anim&quot; + imgclass + &quot; { &quot; +
                rotate + &quot;}&quot;;
            mozframe = &quot; @-moz-keyframes anim&quot; + imgclass + &quot; { &quot; +
                rotate + &quot;}&quot;;
            webkitframe = &quot; @-webkit-keyframes anim&quot; + imgclass + &quot; { &quot; +
                rotate + &quot;}&quot;;
            $('&lt;style&gt; '+ frame + mozframe + webkitframe +
                ' .img'+imgclass+' { animation: anim'+imgclass+' 3s ease 0s infinite alternate;' +
                                   '-moz-animation: anim'+imgclass+' 3s ease 0s infinite alternate;' +
                                   '-webkit-animation: anim'+imgclass+' 3s ease 0s infinite alternate; }'
                +'&lt;/style&gt;').appendTo('head');

            deg = deg + stat;
        });
    });
    &lt;/script&gt;
    &lt;style&gt;
        body {
            background: #fff url('wood_pattern.png') repeat top right;
        }
        .content {
            margin: 0 auto;
            padding: 100px;
        }
        img {
            margin: 10px;
            padding: 20px;
            background: #fff;
            -moz-box-shadow: 0px 0px 3px #d3d3d3;
            -webkit-box-shadow: 0px 0px 3px #d3d3d3;
            box-shadow: 0px 0px 3px #d3d3d3;
            position: absolute;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class=&quot;content&quot;&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img1&quot; src=&quot;img/01.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img2&quot; src=&quot;img/02.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img3&quot; src=&quot;img/03.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img4&quot; src=&quot;img/04.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img5&quot; src=&quot;img/05.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img6&quot; src=&quot;img/06.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img7&quot; src=&quot;img/07.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img8&quot; src=&quot;img/07.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img9&quot; src=&quot;img/09.jpg&quot;/&gt;&lt;/div&gt;
        &lt;div class=&quot;img_c&quot;&gt;&lt;img class=&quot;img10&quot; src=&quot;img/09.jpg&quot;/&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>I use jquery for generating each images angle, and adding CSS animation on the fly using jquery, you can see all the images have the same animation keyframe which is animation to 360deg in 3 seconds, with ease effect, so why not just put on static css style, I don&#8217;t really know what, but on webkit browser it is not working. Here the demo, this might be a lag on firefox.</p>
<h6 style="text-align: center;"><a href="http://demo.superdit.com/css/rotate_animation.html" target="_blank">Demo</a></h6>
<p style="text-align: center;"><a href="http://demo.superdit.com/css/rotate_animation.html" target="_blank"><img class="size-full wp-image-9500" title="jquery css rotate animation" src="http://superdit.com/wp-content/uploads/2011/12/css-rotate-animation.jpg" alt="jquery css rotate animation" width="550" height="550" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/12/11/jquery-css-animation-and-rotate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JQuery Plugin For Rotating Image</title>
		<link>http://superdit.com/2011/12/04/jquery-plugin-for-rotating-image/</link>
		<comments>http://superdit.com/2011/12/04/jquery-plugin-for-rotating-image/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 06:50:12 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[rotate]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=9406</guid>
		<description><![CDATA[Creating a jquery plugin is easier than it sound, first time I heard about creating 3rd party plugin sounds scary, maybe need more deeper understanding about the platform, but not in jquery. Well I just feel something missing if I have been using jquery for a while not to creating a plugin. Few month ago<a href="http://superdit.com/2011/12/04/jquery-plugin-for-rotating-image/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Creating a jquery plugin is easier than it sound, first time I heard about creating 3rd party plugin sounds scary, maybe need more deeper understanding about the platform, but not in jquery. Well I just feel something missing if I have been using jquery for a while not to creating a plugin.</p>
<p><a title="JQuery Plugin For Rotating Image" href="http://superdit.com/2011/12/04/jquery-plugin-for-rotating-image/" target="_blank"><img class="alignnone size-full wp-image-9412" title="jquery image rotate plugin" src="http://superdit.com/wp-content/uploads/2011/12/jquery_rotate.jpg" alt="jquery image rotate plugin" width="550" height="270" /></a></p>
<p>Few month ago I have created a simple tutorial to <a title="Rotating Image Using JQuery" href="http://superdit.com/2011/01/06/rotating-image-using-jquery/" target="_blank">rotating image using jquery</a>, now it would be nice if  I can used as a plugin, and now it a chance to learning simple jquery plugin.<span id="more-9406"></span></p>
<h6 style="text-align: center;"><a href="http://demo.superdit.com/jquery/rotate.html" target="_blank">demo</a> | <a href="http://www.box.com/s/bx9fhe4g2gox40e28hbv" target="_blank">download</a></h6>
<p>Now just straight to the plugin code, this is the code I put on file <em>jquery.rotate.js</em></p>
<pre class="brush: jscript; title: ; notranslate">
(function( $ ) {
    $.fn.myrotate = function() {
        var img = this.find(&quot;img&quot;);
        var imgpos = img.position();
        var x0, y0;

        $(window).load(function() {
            img.removeAttr(&quot;width&quot;);
            img.removeAttr(&quot;height&quot;);

            x0 = imgpos.left + (img.width() / 2);
            y0 = imgpos.top + (img.height() / 2);
        });

        var x, y, x1, y1, drag = 0;

        img.css({
            &quot;cursor&quot;: &quot;pointer&quot;,
            &quot;position&quot;: &quot;relative&quot;
        });

        img.mousemove(function(e) {
            x1 = e.pageX;
            y1 = e.pageY;
            x = x1 - x0;
            y = y1 - y0;

            r = 360 - ((180/Math.PI) * Math.atan2(y,x));

            if (drag == 1) {
                img.css(&quot;transform&quot;,&quot;rotate(-&quot;+r+&quot;deg)&quot;);
                img.css(&quot;-moz-transform&quot;,&quot;rotate(-&quot;+r+&quot;deg)&quot;);
                img.css(&quot;-webkit-transform&quot;,&quot;rotate(-&quot;+r+&quot;deg)&quot;);
                img.css(&quot;-o-transform&quot;,&quot;rotate(-&quot;+r+&quot;deg)&quot;);
            }
        });

        img.mousedown(function() {
            if (drag == 0) {
                drag = 1;
                img.css(&quot;-webkit-box-shadow&quot;, &quot;0 0 5px #999&quot;);
                img.css(&quot;-moz-box-shadow&quot;, &quot;0 0 5px #999&quot;);
                img.css(&quot;box-shadow&quot;, &quot;0 0 5px #999&quot;);
            } else {
                drag = 0;
                img.css(&quot;-webkit-box-shadow&quot;, &quot;0 0 2px #999&quot;);
                img.css(&quot;-moz-box-shadow&quot;, &quot;0 0 2px #999&quot;);
                img.css(&quot;box-shadow&quot;, &quot;0 0 2px #999&quot;);
            }
        });

        img.mouseleave(function() {
            drag = 0;
        });
    };
})( jQuery );
</pre>
<p>The idea is similar from before, to get the image center point and get the cursor coordinate using javascript Math we can find the radian, and rotate the image using CSS. Here are a sample usage</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;&lt;/title&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
    &lt;script src=&quot;jquery-1.6.4.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;jquery.rotate.js&quot;&gt;&lt;/script&gt;
    &lt;script&gt;
        $(function() {
            $(&quot;#content&quot;).myrotate();
            $(&quot;#circle&quot;).myrotate();
        });
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id=&quot;container&quot;&gt;
        &lt;div id=&quot;content&quot;&gt;
            &lt;img src=&quot;img.jpg&quot;/&gt;
        &lt;/div&gt;

        &lt;div id=&quot;circle&quot;&gt;
            &lt;img src=&quot;img.jpg&quot;/&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><a href="http://demo.superdit.com/jquery/rotate.html" target="_blank"><img class="alignnone size-full wp-image-9416" title="jquery rotate plugin" src="http://superdit.com/wp-content/uploads/2011/12/jquery_rotate_thumb.jpg" alt="jquery rotate plugin" width="550" height="357" /></a></p>
<p>There are some problem when you are getting image width and height directly from html &lt;img/&gt; tag in webkit browser, even when we are using jquery, there are a thread from <a title="Get real image width and height with Javascript in Safari/Chrome?" href="http://stackoverflow.com/questions/318630/get-real-image-width-and-height-with-javascript-in-safari-chrome" target="_blank">stackoverflow </a>offer many solution for this.</p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/12/04/jquery-plugin-for-rotating-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sumon Math Game With JQuery</title>
		<link>http://superdit.com/2011/10/09/sumon-math-game-with-jquery/</link>
		<comments>http://superdit.com/2011/10/09/sumon-math-game-with-jquery/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 13:24:55 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=8736</guid>
		<description><![CDATA[In today post I want to share how I make a simple sumon math game based on JQuery, this game inspired by hyperandroid, this game it quite nice to practice your self concentration about math addition.   This post will create that simple nice game, just to show that you can make it with simple<a href="http://superdit.com/2011/10/09/sumon-math-game-with-jquery/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>In today post I want to share how I make a simple sumon math game based on JQuery, this game inspired by <a title="MathMayhem" href="http://labs.hyperandroid.com/mathmayhem" target="_blank">hyperandroid</a>, this game it quite nice to practice your self concentration about math addition.</p>
<p><a title="Sumon Math Game With JQuery" href="http://superdit.com/2011/10/09/sumon-math-game-with-jquery/"><img class="aligncenter size-full wp-image-9146" title="JQuery Sumon Game" src="http://superdit.com/wp-content/uploads/2011/10/JQuerySumGame-thumb.jpg" alt="JQuery Sumon Game" width="550" height="200" /> </a></p>
<p>This post will create that simple nice game, just to show that you can make it with simple jquery, please note that I only add the basic rule of the game, which are, we have to pick the total number that matched the appear random number thats all.<span id="more-8736"></span></p>
<p style="text-align: center;"><strong><a href="http://demo.superdit.com/jquery/sumon_game/" target="_blank">Demo</a> | <a href="http://www.box.net/shared/92ery0npfdqz2fch4pjv" target="_blank">Download</a></strong></p>
<h5>JQuery</h5>
<p>In this example i&#8217;m using a little JQuery UI effect, so not to forget to include it on your script.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
function randomFromTo(from, to){
    return Math.floor(Math.random() * (to - from + 1) + from);
}

Array.prototype.clean = function(deleteValue) {
    for (var i = 0; i &lt; this.length; i++) {
        if (this[i] == deleteValue) {
            this.splice(i, 1);
            i--;
        }
    }
    return this;
};

var sum = 0;
var tempindex = 0;
var numbers = new Array();

function generateRandomSum() {
    var looprand    = randomFromTo(1, 3);
    var total       = 0;
    var arrayIndex  = new Array();

    if (looprand &gt; numbers.length) {
        looprand = numbers.length;
    }

    for (j=0; j&lt;looprand; j++) {
        var randindex = randomFromTo(0, numbers.length - 1);
        randindex = getUnique(randindex, arrayIndex);

        total = total + numbers[randindex];
        arrayIndex[j] = randindex;
    }
    sum = total;
    $(&quot;#nextsum&quot;).html(total);
}

function getUnique(index, arrayIn) {
    if ((jQuery.inArray(index, arrayIn) == -1)) {
        return index;
    } else {
        rindex = randomFromTo(0, numbers.length - 1);
        return getUnique(rindex, arrayIn);
    }
}

var sumtemp = 0;
var numtemp = new Array();

// store temporary index in array
var arrIndex = new Array();
function boxClick(obj) {
    if (!$(obj).hasClass(&quot;disable&quot;)) {
        var clickedindex = parseInt($(obj).attr(&quot;id&quot;).replace(&quot;num&quot;, &quot;&quot;));
        var temp = parseInt($(obj).find(&quot;p&quot;).html());

        if (!$(obj).hasClass(&quot;red&quot;)) {
            $(obj).addClass(&quot;red clicked&quot;);
            // store clicked index in array
            arrIndex[tempindex] = clickedindex;
            sumtemp = sumtemp + temp;
            tempindex++;

            // temporary sum is match
            if (sumtemp == sum) {
                $(&quot;.clicked&quot;).unbind(&quot;click&quot;);
                $(&quot;.clicked&quot;).removeAttr(&quot;id&quot;);
                $(&quot;.clicked&quot;).addClass(&quot;disable&quot;);
                $(&quot;.clicked&quot;).animate({
                   backgroundColor: &quot;#e3e3e3&quot;,
                   color: &quot;#e3e3e3&quot;,
                   borderColor: &quot;#e3e3e3&quot;
                }, 500, function() {
                    $(&quot;.disable&quot;).removeClass(&quot;clicked&quot;);
                });

                // change each box id
                var y = 0;
                $(&quot;#dimcontainer div.boxnum&quot;).each(function(index) {
                    if (!$(this).hasClass(&quot;disable&quot;)) {
                        $(this).attr(&quot;id&quot;, &quot;num&quot;+y);
                        y++;
                    }
                });

                // delete matched number
                for ( z = 0; z &lt; arrIndex.length; z++) {
                    delete numbers[arrIndex[z]];
                }

                // delete temporay index
                for ( e = 0; e &lt;= arrIndex.length; e++) {
                    delete arrIndex[e];
                }
                arrIndex.clean(undefined);
                numbers.clean(undefined);

                sum = 0;
                sumtemp = 0;
                // reset index
                tempindex = 0;

                generateRandomSum();

                // Game Finished
                if (numbers.length == 0) {
                    $(&quot;#nextsum&quot;).html(&quot;Thanks For Playing!&quot;);
                }
            }

            // temporary sum not match
            if (sumtemp &gt; sum) {
                $(&quot;#dimcontainer&quot;).effect(&quot;shake&quot;, { times: 1 }, &quot;fast&quot;, function() {
                    sumtemp = 0;
                    $(&quot;.boxnum&quot;).removeClass(&quot;red&quot;);
                    $(&quot;.clicked&quot;).removeClass(&quot;clicked&quot;);
                    $(&quot;#sum&quot;).html(sumtemp);

                    // delete the temporary array &amp; reset index
                    numtemp = new Array();
                    tempindex = 0;
                });
            }
        } else {
            $(obj).removeClass(&quot;red&quot;);
            $(obj).removeClass(&quot;clicked&quot;);

            // remove clicked index
            for (x = 0; x &lt; arrIndex.length; x++) {
                if (arrIndex[x] == clickedindex) {
                    arrIndex.splice(x, 1);
                }
            }
            tempindex--;

            sumtemp = sumtemp - temp;
        }
    }
}

function start() {
    // create a number of box and generate random number in array
    sum          = 0;
    sumtemp      = 0;
    tempindex    = 0;
    var val          = parseInt($(&quot;#cbdim&quot;).val());
    var boxloop      = val * val;
    var boxleft      = ($(window).width() - (val * 78)) / 2;
    $(&quot;#dimcontainer&quot;).html('&lt;div id=&quot;boxclear&quot;&gt;&lt;/div&gt;');
    $(&quot;#dimcontainer&quot;).css({
        width: (val * 78) + &quot;px&quot;,
        left: boxleft + &quot;px&quot;
    });

    for ( i = 0; i &lt; boxloop; i++) {
        numbers[i] = randomFromTo(1, 15);
        $('#boxclear').before('&lt;div class=&quot;boxnum&quot; id=&quot;num'+i+'&quot; '+
            ' onclick=&quot;boxClick(this);&quot;&gt;&lt;p&gt;'+numbers[i]+'&lt;/p&gt;&lt;/div&gt;');
    }
    generateRandomSum();
}
&lt;/script&gt;
</pre>
<p>1. function<em> randomFromTo</em>, from <a title="JavaScript Tip: get a Random Number between two Integers" href="http://www.admixweb.com/2010/08/24/javascript-tip-get-a-random-number-between-two-integers/" target="_blank">admixweb</a>, this function will get random number between the two input parameter.</p>
<p>2. function  <em>Array.prototype.clean</em> , from <a href="http://stackoverflow.com/questions/281264/remove-empty-elements-from-an-array-in-javascript" target="_blank">stackoverflow</a>, this function will clean the array, I use this with javascript <em>delete</em> function to cleaning the array, since I haven&#8217;t found how to destroying an array in javascript.</p>
<p>3. function <em>generateRandomSum</em>, this function will pick the total random in array, the total picked number is random from one to three, and each index of the array must be unique.</p>
<p>4. function <em>getUnique</em>, this function will get unique index of array that stored in array, this are recursive function, it will continue run until find the unique array index.</p>
<p>5. function <em>boxClick, </em>this is the main event function of this example, many array variable used in this function, I admit I fell a little bit confuse when debugging this, that I have to delete array, change array, clean. etc.</p>
<p>6. function <em>start, </em>this is the initialization when displaying the box, it creating each box by looping on the fly, based on the dimensions size that picked.</p>
<h5>HTML</h5>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;container&quot;&gt;
    &lt;div id=&quot;pick&quot;&gt;
        Pick Dimension: &amp;nbsp;
        &lt;select id=&quot;cbdim&quot; style=&quot;font-size:18px;&quot;&gt;
            &lt;option value=&quot;3&quot;&gt;3 x 3&lt;/option&gt;
            &lt;option value=&quot;4&quot;&gt;4 x 4&lt;/option&gt;
            &lt;option value=&quot;5&quot;&gt;5 x 5&lt;/option&gt;
            &lt;option value=&quot;6&quot;&gt;6 x 6&lt;/option&gt;
            &lt;option value=&quot;7&quot;&gt;7 x 7&lt;/option&gt;
        &lt;/select&gt;
        &lt;button id=&quot;btnstart&quot; onclick=&quot;start();&quot;&gt;Start Game !&lt;/button&gt;
    &lt;/div&gt;
    &lt;p id=&quot;pnext&quot;&gt;Next Total: &amp;nbsp;&lt;span id=&quot;nextsum&quot;&gt;0&lt;/span&gt;&lt;/p&gt;

    &lt;div id=&quot;dimcontainer&quot;&gt;
        &lt;div id=&quot;boxclear&quot; style=&quot;clear:both&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<h5>CSS</h5>
<pre class="brush: css; title: ; notranslate">
* {
    font-family: Arial, &quot;Free Sans&quot;;
}
body {
    background: #fff url(&quot;circles.png&quot;) repeat right top;
}
#container {
    margin: 0 auto;
    text-align: center;
}
#dimcontainer {
    padding: 2px;
    margin: 0 auto;
    left: 500px;
}
.boxnum {
    text-align: center;
    cursor: pointer;
    border: 2px solid #e3e3e3;
    background: #fff;
    width: 70px;
    height: 70px;
    margin: 2px;
    float: left;
    color: #D80000;
    -webkit-border-radius: .3em;
    -moz-border-radius: .3em;
    border-radius: .3em;
}
.boxnum:hover {
    background: #e3e3e3;
}
.boxnum p {
    margin-top: 20px;
    font-size: 28px;
    font-weight: bold;
    text-shadow: -1px 1px 1px #fff;
}
.red {
    background: #ff0000;
    border-color: #ff0000;
}
.red:hover {
    background: #ff0000 !important;
}
#boxclear {
    clear: both;
}
#pnext {
    font-size: 18px;
}
#nextsum {
    font-weight: bold;
    font-size: 30px;
    position: relative;
    top: 3px;
}
#pick {
    font-size: 18px;
}
</pre>
<p>That&#8217;s all, I know this example is not perfect but at least this is one of the way how you make it, you can improve it by adding some several features like, game scoring, help instruction, difficulty (by adding range in the random number), some bug fixing for preventing rapid click, etc.</p>
<p style="text-align: center;"><strong><a href="http://demo.superdit.com/jquery/sumon_game/" target="_blank">Demo</a> | <a href="http://www.box.net/shared/92ery0npfdqz2fch4pjv" target="_blank">Download</a></strong></p>
<p style="text-align: center;"><a href="http://demo.superdit.com/jquery/sumon_game/" target="_blank"><img class="aligncenter size-full wp-image-9131" title="JQuery Sumon Game" src="http://superdit.com/wp-content/uploads/2011/10/JQuerySumGame.jpg" alt="JQuery Sumon Game" width="424" height="519" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/10/09/sumon-math-game-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slide Navigation Using JQuery With Easing Plugin</title>
		<link>http://superdit.com/2011/09/07/slide-navigation-using-jquery-with-easing-plugin/</link>
		<comments>http://superdit.com/2011/09/07/slide-navigation-using-jquery-with-easing-plugin/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 00:26:20 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[easing]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=8492</guid>
		<description><![CDATA[Few days ago I browse the apple official site and looking some mac product, the navigation at apple mac page are using an easing effect, it separating each product by the category, I love the effect when user click on the navigation it like the products appear and disappear one by one, with the easing<a href="http://superdit.com/2011/09/07/slide-navigation-using-jquery-with-easing-plugin/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Few days ago I browse the apple official site and looking some mac product, the navigation at apple mac page are using an easing effect, it separating each product by the category, I love the effect when user click on the navigation it like the products appear and disappear one by one, with the easing effect on the end movement, like bouncing on the vertical line.</p>
<p><a title="Slide Navigation Using JQuery With Easing Plugin" href="http://superdit.com/2011/09/07/slide-navigation-using-jquery-with-easing-plugin/" target="_blank"><img class="alignnone size-full wp-image-8614" title="apple mac product page" src="http://superdit.com/wp-content/uploads/2011/09/apple-mac.jpg" alt="" width="550" height="250" /></a></p>
<p>If you see the source code on apple page, seems they are still using prototype.js, once are the most popular javascript framework, before the appearance of  jquery. In this post I want to create something like the apple mac navigation menu using jquery easing plugins.<span id="more-8492"></span></p>
<p style="text-align: center;"><strong><a href="http://demo.superdit.com/jquery/slide_easing" target="_blank">Demo</a> | <a title="JQuery Slide Easing Download" href="http://www.box.net/shared/ibmafblaif6gh3n2n1vk" target="_blank">Download</a></strong></p>
<p>The <a title="Apple Mac" href=" http://www.apple.com/mac/" target="_blank">apple mac</a> page not only dealing with the effect but also with the selected navigation, and for the easing effect I use <a title="jQuery Easing Plugin (version 1.3)" href="http://gsgd.co.uk/sandbox/jquery/easing/" target="_blank">jQuery easing plugin</a>, although it is an old plugin, but it still work or maybe you can use jquery ui bounce effect for the alternative.</p>
<h5>HTML</h5>
<p>The html code are mostly the same as when you are create an image slideshow using the the overflow css property, and syncronize the nave of product container and navigation so it can be easily manipulated by jquery.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;container&quot;&gt;
    &lt;div id=&quot;container_wide&quot;&gt;
        &lt;div class=&quot;product_container&quot; id=&quot;product_browser&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/browser/Chrome.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/browser/Safari.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/browser/Firefox.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/browser/IE.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/browser/Maxthon.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/browser/Opera.png&quot;&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class=&quot;product_container&quot; id=&quot;product_apple&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/apple/iMac.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/apple/MacBook.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/apple/MacMini.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/apple/iPhone.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/apple/Macpro.png&quot;&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class=&quot;product_container&quot; id=&quot;product_construction&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/construction/01.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/construction/02.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/construction/03.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/construction/04.png&quot;&gt;&lt;/a&gt;
        &lt;/div&gt;
         &lt;div class=&quot;product_container&quot; id=&quot;product_cake&quot;&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/cake/01.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/cake/02.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/cake/03.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/cake/04.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/cake/05.png&quot;&gt;&lt;/a&gt;
            &lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/cake/06.png&quot;&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;nav&quot;&gt;
    &lt;a href=&quot;#&quot; class=&quot;product_nav&quot; id=&quot;nav_browser&quot;&gt;Browser&lt;/a&gt;
    &lt;a href=&quot;#&quot; class=&quot;product_nav&quot; id=&quot;nav_apple&quot;&gt;Apple&lt;/a&gt;
    &lt;a href=&quot;#&quot; class=&quot;product_nav&quot; id=&quot;nav_construction&quot;&gt;Construction&lt;/a&gt;
    &lt;a href=&quot;#&quot; class=&quot;product_nav&quot; id=&quot;nav_cake&quot;&gt;Cake&lt;/a&gt;
&lt;/div&gt;
</pre>
<h5>CSS</h5>
<pre class="brush: css; title: ; notranslate">
* {
    font-family: Arial, &quot;Free Sans&quot;;
}
.container {
    border: 5px solid #0099cc;
    width: 700px;
    overflow: hidden;
    margin: 0 auto;
    margin-top: 50px;
    padding: 10px 0;
    -webkit-border-radius: .3em .3em 0 0;
    -moz-border-radius: .3em .3em 0 0;
    border-radius: .3em .3em 0 0;
}
#container_wide {
    width: 2800px;position: relative;
}
.product_container {
    text-align: center;
    width: 700px;
    float: left;
    position: relative;
}
.product_container a {
    margin: 0 12px;
    position: relative;
}
.nav {
    width: 700px;
    background: #0099cc;
    margin: 0 auto;
    text-align: center;
    border: 5px solid #0099cc;
    border-bottom-width: 10px;
    -webkit-border-radius: 0 0 .3em .3em;
    -moz-border-radius: 0 0 .3em .3em;
    border-radius: 0 0 .3em .3em;
}
.nav a {
    color: #fff;
    font-size: 12px;
    letter-spacing: 1px;
    margin-right: 10px;
    font-weight: bold;
    text-decoration: none;
}
.nav a:hover {
    color: #e3e3e3;
}
</pre>
<h5>JQuery</h5>
<p>The jquery code will move each item one by one from it specific product container with a time delay, when you are creating image slideshow simply just move the div container, and the image will change.</p>
<p><img class="alignnone size-full wp-image-8630" title="jquery easing slide mockup" src="http://superdit.com/wp-content/uploads/2011/09/jquery-easing-slide-mockup.png" alt="jquery easing slide mockup" width="550" height="159" /></p>
<p>But in this case we cannot do that cause if we move the container all the item will be move as well, but the container still needed to make the product alignment tidy.</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {
    var displayed = &quot;product_browser&quot;;
    var cindex = 0; // current index (displayed product)

    function loopMoveLeft(el, move) {
        if (el.length == 1) {
            setTimeout(function() {
                el.animate({ left: move }, {
                    duration: 'slow',
                    easing: 'easeOutBounce'
                });
                loopMoveLeft(el.next(), move);
            }, 100);
        }
    }

    function loopMoveRight(el, move) {
        if (el.length == 1) {
            setTimeout(function() {
                el.animate({ left: move }, {
                    duration: 'slow',
                    easing: 'easeOutBounce'
                });
                loopMoveRight(el.prev(), move);
            }, 100);
        }
    }

    function slideItem(obj_el) {
        var product = $(obj_el).attr(&quot;id&quot;).replace(&quot;nav_&quot;, &quot;&quot;);
        var contid = 'product_' + product;

        // current displayed element
        var elFirst = $(&quot;#&quot;+displayed+&quot; a:first-child&quot;);
        var elLast = $(&quot;#&quot;+displayed+&quot; a:last-child&quot;);
        var total_el = $(&quot;#&quot;+displayed).children().length;

        var index = $(obj_el).index();

        // new element to displayed
        var el_f = $(&quot;#&quot;+contid+&quot; a:first-child&quot;);
        var el_l = $(&quot;#&quot;+contid+&quot; a:last-child&quot;);
        var total_new = $(&quot;#&quot;+contid).children().length;

        var movement = -700 * index;

        if (cindex &gt; index) {
            loopMoveRight(elLast, movement);
            setTimeout(function() {
                loopMoveRight(el_l, movement)
            }, (total_el + 1) * 100);
        } else if (cindex &lt; index) {
            loopMoveLeft(elFirst, movement);
            setTimeout(function() {
                loopMoveLeft(el_f, movement)
            }, (total_el + 1) * 100);
        }

        cindex = index;
        displayed = contid;

        return (total_el + 5 + total_new) * 100;
    }

    var timeout;

    $(&quot;.product_nav&quot;).click(function() {
        $(&quot;.product_nav&quot;).unbind('click');
        timeout = slideItem(this);

        // prevent abusive click
        setTimeout(function() {
            $(&quot;.product_nav&quot;).bind('click', function() {
                timeout = slideItem(this);
            });
        }, timeout);
    });
});
</pre>
<p style="text-align: left;">You can see on code above this example mostly using the <em>setTimeout </em>to make each item move in sequence, the bind and unbind used for preventing abusive click from user and it still using <em>setTimeout</em> too.</p>
<p style="text-align: center;"><a href="http://demo.superdit.com/jquery/slide_easing" target="_blank"><img class="size-full wp-image-8633 aligncenter" title="jquery easing navigation demo" src="http://superdit.com/wp-content/uploads/2011/09/demo.png" alt="jquery easing navigation demo" width="550" height="121" /></a></p>
<p style="text-align: center;"><strong><a href="http://demo.superdit.com/jquery/slide_easing" target="_blank">Demo</a> | <a title="JQuery Slide Easing Download" href="http://www.box.net/shared/ibmafblaif6gh3n2n1vk" target="_blank">Download</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/09/07/slide-navigation-using-jquery-with-easing-plugin/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Swipe Like Effect Based On JQuery UI Draggable</title>
		<link>http://superdit.com/2011/08/28/swipe-like-effect-based-on-jquery-ui-draggable/</link>
		<comments>http://superdit.com/2011/08/28/swipe-like-effect-based-on-jquery-ui-draggable/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 12:34:34 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[swipe]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=8401</guid>
		<description><![CDATA[Swipe effect has becoming popular when mobile application usage increase, it a nice touch effect to slide between layout, and some of mobile web application framework has already have this feature for example you can see sencha touch carousel component, but I think the swipe effect can be good enough too, not only for mobile<a href="http://superdit.com/2011/08/28/swipe-like-effect-based-on-jquery-ui-draggable/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Swipe effect has becoming popular when mobile application usage increase, it a nice touch effect to slide between layout, and some of mobile web application framework has already have this feature for example you can see sencha touch carousel component, but I think the swipe effect can be good enough too, not only for mobile web but for web desktop too. Here I want to share a little idea creating swipe like effect based on jquery UI draggable. Basically the idea is really simple it is the combination of  revert option in jquery ui draggable, jquery animation for moving an element, and mouse event for firing when the item have to swipe.</p>
<h6>HTML</h6>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;container&quot;&gt;
    &lt;div id=&quot;swipe_container&quot;&gt;
        &lt;div class=&quot;item&quot;&gt;Item Swipe 1&lt;/div&gt;
        &lt;div class=&quot;item&quot;&gt;Item Swipe 2&lt;/div&gt;
        &lt;div class=&quot;item&quot;&gt;Item Swipe 3&lt;/div&gt;
        &lt;div class=&quot;item&quot;&gt;Item Swipe 4&lt;/div&gt;
        &lt;div class=&quot;item&quot;&gt;Item Swipe 5&lt;/div&gt;
        &lt;div style=&quot;clear:both&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<h6 style="text-align: center;"><a href="http://demo.superdit.com/jquery/swipe_like_effect.html" target="_blank"><span id="more-8401"></span>Demo</a></h6>
<h6>CSS</h6>
<p>Make sure the swipe container width equal or larger than total items width for example you have 3 item swipe with 300px width, use minimum 900px for swipe container width.</p>
<pre class="brush: css; title: ; notranslate">
#container {
    width: 320px;
    height: 480px;
    overflow: hidden;
    border: 5px solid #0099cc;
    margin:0 auto;
}
#swipe_container {
    width: 1600px;
    background: #999;
}
.item {
    font-size: 24px;
    width: 320px;
    height: 480px;
    float: left;
    background: #e3e3e3;
}
</pre>
<h6>JQuery</h6>
<p>This jquery code will count the items inside the swipe container, this used for detecting whether it is the first item or the last item to swipe, if true, the position not change and to make it look like swiping an item, add the <em>revent </em>option on the draggable function.</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {
    var cont_pos = $(&quot;#swipe_container&quot;).position();
    var item_width = $(&quot;.item&quot;).width();
    var items = $(&quot;#swipe_container &gt; div.item&quot;).length;
    var item_index = 1;
    var cont_post_temp;

    $(&quot;#swipe_container&quot;).draggable({ axis: &quot;x&quot;, revert: true });

    function bindMouseUp() {
        $(&quot;#swipe_container&quot;).unbind('mouseup');
        cont_post_temp = $(&quot;#swipe_container&quot;).position().left;
        if (cont_pos.left &gt; cont_post_temp &amp;&amp; item_index != items) {
            // swipe to right
            $(&quot;#swipe_container&quot;).draggable(&quot;option&quot;, &quot;revert&quot;, false);
            var moveLeft = cont_pos.left - cont_post_temp;
            moveLeft = Math.abs(item_width - moveLeft);
            $(&quot;#swipe_container&quot;).animate({
                left: '-=' + moveLeft
            }, 500, function() {
                $(&quot;#swipe_container&quot;).draggable(&quot;option&quot;, &quot;revert&quot;, true);
                cont_pos = $(&quot;#swipe_container&quot;).position();
                $(&quot;#swipe_container&quot;).bind('mouseup', function() {
                    bindMouseUp();
                });
            });
            item_index++;;
        } else if (cont_pos.left &lt; cont_post_temp &amp;&amp; item_index != 1) {
            // swipe to left
            $(&quot;#swipe_container&quot;).draggable(&quot;option&quot;, &quot;revert&quot;, false);
            var moveLeft = cont_post_temp - cont_pos.left;
            moveLeft = Math.abs(item_width - moveLeft);
            $(&quot;#swipe_container&quot;).animate({
                left: '+=' + moveLeft
            }, 500, function() {
                $(&quot;#swipe_container&quot;).draggable(&quot;option&quot;, &quot;revert&quot;, true);
                cont_pos = $(&quot;#swipe_container&quot;).position();
                $(&quot;#swipe_container&quot;).bind('mouseup', function() {
                    bindMouseUp();
                });
            });
            item_index = item_index - 1;
        } else {
            // on the beginning or end item swipe
            $(&quot;#swipe_container&quot;).draggable( &quot;option&quot;, &quot;revert&quot;, true );
            $(&quot;#swipe_container&quot;).bind('mouseup', function() {
                bindMouseUp();
            });
        }
    }

    $(&quot;#swipe_container&quot;).mouseup(function() {
        bindMouseUp();
    });
});
</pre>
<p>In above code the swipe function is triggered on <em>bingMouseUp, </em>in this function I have to bind and unbind the mouse event and the revert for preventing abuse mouse event, from user. That is all I know this not perfect, like this swipe only happen when the mouse up, but when mouse leave an item it came back to previous position.</p>
<h6 style="text-align: center;"><a href="http://demo.superdit.com/jquery/swipe_like_effect.html" target="_blank">Demo</a></h6>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/08/28/swipe-like-effect-based-on-jquery-ui-draggable/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Easy JQuery Circular Gallery Using RadMenu Plugin</title>
		<link>http://superdit.com/2011/06/24/easy-jquery-circular-gallery-using-radmenu-plugin/</link>
		<comments>http://superdit.com/2011/06/24/easy-jquery-circular-gallery-using-radmenu-plugin/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 10:45:15 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[radmenu]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=6993</guid>
		<description><![CDATA[Today post, let&#8217;s playing a little code with JQuery and JQuery RadMenu Plugin, cause lately I&#8217;ve been thinking about creating circular image gallery my self, and my search stop here for a moment when finding this cool plugins. This plugin is really cool you can creating a circle from many html element that you defined,<a href="http://superdit.com/2011/06/24/easy-jquery-circular-gallery-using-radmenu-plugin/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Today post, let&#8217;s playing a little code with JQuery and JQuery RadMenu Plugin, cause lately I&#8217;ve been thinking about creating circular image gallery my self, and my search stop here for a moment when finding this cool plugins.</p>
<p><a title="Easy JQuery Circular Gallery Using RadMenu Plugin" href="http://superdit.com/2011/06/24/easy-jquery-circular-gallery-using-radmenu-plugin/"><img class="alignnone size-full wp-image-7598" title="JQuery Circle Gallery" src="http://superdit.com/wp-content/uploads/2011/06/JQueryCircleGalleryThumbs.jpg" alt="JQuery Circle Gallery" width="586" height="200" /></a></p>
<p>This plugin is really cool you can creating a circle from many html element that you defined, which means you don&#8217;t have to create a formula to set all the element position to create a circle form.<span id="more-6993"></span></p>
<p><strong>Plugin: </strong><a title="JQuery RadMenu Plugin" href="http://tikku.com/jquery-radmenu-plugin" target="_blank">RadMenu</a></p>
<h5>All Code</h5>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;JQuery Circle Gallery&lt;/title&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.6.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;jQuery.radmenu.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    jQuery(document).ready(function() {

        var posc = $(&quot;#radial_container&quot;).position();
        var left = $(window).width() / 2;

        if ($.browser.opera) {
            $(&quot;#big&quot;).css({&quot;left&quot;: left - 122, &quot;top&quot;: posc.top - 13});
        } else {
            $(&quot;#big&quot;).css({&quot;left&quot;: left - 122, &quot;top&quot;: posc.top + 3});
        }

        jQuery(&quot;#radial_container&quot;).radmenu({
            listClass: 'list',
            itemClass: 'item',
            radius: 220,
            animSpeed:800,
            centerX: 0,
            centerY: 150,
            selectEvent: &quot;click&quot;,
            onSelect: function($selected) {
                var imgindex = $selected.index() + 1;
                $(&quot;.my_class&quot;).removeClass(&quot;selected&quot;);
                $(&quot;.img&quot;+imgindex).addClass(&quot;selected&quot;);
                $(&quot;#big&quot;).css(&quot;background-image&quot;, &quot;url('images/&quot;+imgindex+&quot;.jpg')&quot;);
            },
            angleOffset: 0
        });

        jQuery(&quot;#radial_container&quot;).radmenu(&quot;show&quot;);
    });
    &lt;/script&gt;
    &lt;style&gt;
    body{
        background: #f3f3f3;
    }
    #radial_container {
        position:relative;
        margin: 0 auto;
        top: 80px;
        height: 20px;
        width: 20px;
    }
    .radial_div_item {
    }
    .radial_div_item.active {
        z-index: 100;
    }
    .my_class {
        cursor: pointer;
        height: 75px;
        width: 75px;
        border: 5px solid #333;
        -moz-border-radius: 45px;
        -webkit-border-radius: 45px;
        border-radius: 45px;
        -webkit-box-shadow: 1px 1px 10px rgba(0,0,0,.5);
        -moz-box-shadow: 1px 1px 10px rgba(0,0,0,.5);
        box-shadow: 1px 1px 10px rgba(0,0,0,.5);
        position: relative;
        text-align: center;
        font-size: 12px;
        font-weight: bold;
        font-family: &quot;Arial&quot;;
    }
    .my_class:hover {
        border-color: #0066cc;
    }
    .my_class:active {
        -webkit-box-shadow: 1px 1px 5px rgba(0,0,0,.5);
        -moz-box-shadow: 1px 5px 1px rgba(0,0,0,.5);
        box-shadow: 1px 1px 5px rgba(0,0,0,.5);
        top: 2px;
        border-color: #e3e3e3;
    }
    .img1 { background-image: url(&quot;images/thumbs/1.jpg&quot;); }
    .img2 { background-image: url(&quot;images/thumbs/2.jpg&quot;); }
    .img3 { background-image: url(&quot;images/thumbs/3.jpg&quot;); }
    .img4 { background-image: url(&quot;images/thumbs/4.jpg&quot;); }
    .img5 { background-image: url(&quot;images/thumbs/5.jpg&quot;); }
    .img6 { background-image: url(&quot;images/thumbs/6.jpg&quot;); }
    .img7 { background-image: url(&quot;images/thumbs/7.jpg&quot;); }
    .img8 { background-image: url(&quot;images/thumbs/8.jpg&quot;); }
    .img9 { background-image: url(&quot;images/thumbs/9.jpg&quot;); }
    .img10 { background-image: url(&quot;images/thumbs/10.jpg&quot;); }
    .selected {
        border-color: #0066cc;
    }

    #big {
        position: relative;
        border: 5px solid #0066cc;
        width: 300px;
        height: 300px;
        -moz-border-radius: 200px;
        -webkit-border-radius: 200px;
        border-radius: 200px;
        -webkit-box-shadow: 1px 1px 10px rgba(0,0,0,.5);
        -moz-box-shadow: 1px 1px 10px rgba(0,0,0,.5);
        box-shadow: 1px 1px 10px rgba(0,0,0,.5);
    }

    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;radial_container&quot;&gt;
    &lt;ul class=&quot;list&quot;&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img1&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img2&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img3&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img4&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img5&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img6&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img7&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img8&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img9&quot;&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;li class=&quot;item&quot;&gt;&lt;div class=&quot;my_class img10&quot;&gt;&lt;/div&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;

&lt;div id=&quot;big&quot;&gt;&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p style="text-align: left;">This example only follow the original example at the plugin page, with a little style modification and added selected image on the center of the circle, just take some attention to css position for this. If you want more advance tutorial you can read <a href="http://addyosmani.com/blog/jquery-roundrr/" target="_blank">addyosmani jquery roudrr</a> blog post, he explain step by step how to create a circle form from a set of images.</p>
<p style="text-align: center;"><a class="button large blue" href="http://www.box.net/shared/qhi8oa9fcv3us7j3igue" target="_blank">Download</a> <a class="button large green" href="http://demo.superdit.com/jquery/circle_gallery/" target="_blank">Demo</a></p>
<p><a href="http://demo.superdit.com/jquery/circle_gallery/" target="_blank"><img class="alignnone size-full wp-image-7593" title="JQuery Circle Gallery Using RadMenu Plugin" src="http://superdit.com/wp-content/uploads/2011/06/JQuery-Circle-Gallery.jpg" alt="JQuery Circle Gallery Using RadMenu Plugin" width="586" height="549" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/06/24/easy-jquery-circular-gallery-using-radmenu-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Hover Image Zoom With JQuery</title>
		<link>http://superdit.com/2011/06/11/hover-image-zoom-with-jquery/</link>
		<comments>http://superdit.com/2011/06/11/hover-image-zoom-with-jquery/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 01:35:35 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[hover]]></category>
		<category><![CDATA[zoom]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=7177</guid>
		<description><![CDATA[In today I create a little code snippet in JQuery, this time is about zooming hovered image, this kind of feature might be fit for a web gallery site which have many content, to giving a little quick preview about the item. Here the code, not really much to say, just playing little with jquery<a href="http://superdit.com/2011/06/11/hover-image-zoom-with-jquery/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>In today I create a little code snippet in JQuery, this time is about zooming hovered image, this kind of feature might be fit for a web gallery site which have many content, to giving a little quick preview about the item.</p>
<p><img class="alignnone size-full wp-image-7236 aligncenter" title="JQuery Image Zoom Hover" src="http://superdit.com/wp-content/uploads/2011/06/screen.png" alt="JQuery Image Zoom Hover" width="540" height="205" /></p>
<p>Here the code, not really much to say, just playing little with jquery animate function and some CSS property such as top, left, width and height.<span id="more-7177"></span></p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;JQuery Zoom Hover&lt;/title&gt;
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
    &lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.6.1.min.js&quot;&gt;&lt;/script&gt;
    &lt;script type=&quot;text/javascript&quot;&gt;
    $(document).ready(function() {
        var cont_left = $(&quot;#container&quot;).position().left;
        $(&quot;a img&quot;).hover(function() {
            // hover in
            $(this).parent().parent().css(&quot;z-index&quot;, 1);
            $(this).animate({
               height: &quot;250&quot;,
               width: &quot;250&quot;,
               left: &quot;-=50&quot;,
               top: &quot;-=50&quot;
            }, &quot;fast&quot;);
        }, function() {
            // hover out
            $(this).parent().parent().css(&quot;z-index&quot;, 0);
            $(this).animate({
                height: &quot;150&quot;,
                width: &quot;150&quot;,
                left: &quot;+=50&quot;,
               top: &quot;+=50&quot;
            }, &quot;fast&quot;);
        });

        $(&quot;.img&quot;).each(function(index) {
            var left = (index * 160) + cont_left;
            $(this).css(&quot;left&quot;, left + &quot;px&quot;);
        });
    });
    &lt;/script&gt;
    &lt;style type=&quot;text/css&quot;&gt;
        #container {
            text-align: center;
            position: absolute;
            left: 260px;
            margin-top: 150px;
            width: 790px;
        }
        .img {
            position: fixed;
            z-index: 0;
        }
        .end {
            margin-right: 0;
        }
        .clear {
            clear: both;
        }
        .img a img {
            position: relative;
            border: 0 solid #fff;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id=&quot;container&quot;&gt;
        &lt;div class=&quot;img&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/1.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;div class=&quot;img&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/2.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;div class=&quot;img&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/3.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;div class=&quot;img&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/4.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;div class=&quot;img end&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;img/5.jpg&quot;/&gt;&lt;/a&gt;&lt;/div&gt;
        &lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p style="text-align: left;">I&#8217;m using 5 images here, the zoom in effect triggered when the mouse is hover in, and vice versa. We need to manipulate the top and left in animating to make the zoom effect looks tidy, and this how to measure the movement number, let say your images 100px x 100px and zoomed to 200px x 200px, which mean you have to make the top and left reduced by 50px (200px &#8211; 100px) / 2 when the zoomin triggered, easy right, and that&#8217;s all.</p>
<p style="text-align: center;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"><a class="button large blue" title="jquery zoom hover demo" href="http://demo.superdit.com/jquery/zoom_hover/" target="_blank">Demo</a> <a class="button large green" href="http://www.box.net/shared/8656gq5y5sxnoc5ff9ox" target="_blank">Download</a></span></p>
<p style="text-align: center;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;"><a href="http://demo.superdit.com/jquery/zoom_hover/" target="_blank"><img class="alignnone size-full wp-image-7236" title="JQuery Image Zoom Hover" src="http://superdit.com/wp-content/uploads/2011/06/screen.png" alt="JQuery Image Zoom Hover" width="540" height="205" /></a></span></p>
<p style="text-align: center;"><em><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px; white-space: normal;">stock photos by <a href="http://www.flickr.com/groups/architecture/" target="_blank">flickr architecture group</a></span></em></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/06/11/hover-image-zoom-with-jquery/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>12 JQuery Based Rich Text Editor</title>
		<link>http://superdit.com/2011/05/21/12-jquery-based-rich-text-editor/</link>
		<comments>http://superdit.com/2011/05/21/12-jquery-based-rich-text-editor/#comments</comments>
		<pubDate>Sat, 21 May 2011 07:23:07 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=6686</guid>
		<description><![CDATA[Rich Text Editor maybe one of a must feature in publishing web application like wordpress, joomla, or any other CMS, here I&#8217;m collecting some of rich text editor based on JQuery, surely it must be used for JQuery lover. But I cannot find a popular one like TinyMCE or CKEditor, whatever some of this quite<a href="http://superdit.com/2011/05/21/12-jquery-based-rich-text-editor/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>Rich Text Editor maybe one of a must feature in publishing web application like wordpress, joomla, or any other CMS, here I&#8217;m collecting some of rich text editor based on JQuery, surely it must be used for JQuery lover.</p>
<p><a href="http://superdit.com/2011/05/21/12-jquery-based-rich-text-editor"><img class="alignnone size-full wp-image-6708" title="JQuery Based Rich Text Editor" src="http://superdit.com/wp-content/uploads/2011/05/thumbs.jpg" alt="JQuery Based Rich Text Editor" width="540" height="162" /></a></p>
<p>But I cannot find a popular one like TinyMCE or CKEditor, whatever some of this quite good for your project.<span id="more-6686"></span></p>
<h5>1. MarkItUp</h5>
<p><a href="http://markitup.jaysalvat.com/" target="_blank"><img class="alignnone size-full wp-image-6691" title="markitup" src="http://superdit.com/wp-content/uploads/2011/05/01-markitup.png" alt="markitup" width="540" height="303" /></a></p>
<p><a title="markitup" href="http://markitup.jaysalvat.com/" target="_blank">visit</a> | <a title="markitup examples" href="http://markitup.jaysalvat.com/examples/" target="_blank">demo</a> | <a title="markitup download" href="http://markitup.jaysalvat.com/downloads/" target="_blank">download</a></p>
<h5>2. jWYSIWYG</h5>
<p><a href="https://github.com/akzhan/jwysiwyg" target="_blank"><img class="alignnone size-full wp-image-6693" title="jwysiwyg" src="http://superdit.com/wp-content/uploads/2011/05/02-jwysiwyg.png" alt="jwysiwyg" width="434" height="329" /></a></p>
<p><a title="jwysiwyg" href="https://github.com/akzhan/jwysiwyg" target="_blank">visit</a> | <a title="jwysiwyg examples" href="http://akzhan.github.com/jwysiwyg/help/examples/" target="_blank">demo</a> | <a title="jwysiwyg download" href="https://github.com/akzhan/jwysiwyg/archives/master" target="_blank">download</a></p>
<h5>3. jHtmlArea</h5>
<p><a href="http://jhtmlarea.codeplex.com/" target="_blank"><img class="alignnone size-full wp-image-6694" title="jHtmlArea" src="http://superdit.com/wp-content/uploads/2011/05/03-jHtmlArea.png" alt="jHtmlArea" width="455" height="352" /></a></p>
<p><a title="jHtmlArea" href="http://jhtmlarea.codeplex.com/" target="_blank">visit</a> | <a title="jHtmlArea demo" href="http://pietschsoft.com/demo/jHtmlArea/" target="_blank">demo</a> | <a title="jhtmlarea download" href="http://jhtmlarea.codeplex.com/releases/view/30759" target="_blank">download</a></p>
<h5>4. WYMEditor</h5>
<p><a href="https://github.com/wymeditor/wymeditor" target="_blank"><img class="alignnone size-full wp-image-6695" title="wymeditor" src="http://superdit.com/wp-content/uploads/2011/05/04-wymeditor.png" alt="wymeditor" width="461" height="338" /></a></p>
<p><a title="wymeditor" href="https://github.com/wymeditor/wymeditor" target="_blank">visit</a> | <a title="wymeditor examples" href="https://github.com/wymeditor/wymeditor/tree/master/src/examples" target="_blank">demo</a> | <a title="wymeditor download" href="https://github.com/wymeditor/wymeditor/archives/master" target="_blank">download</a></p>
<h5>5. Light Weight RTE JQuery</h5>
<p><a href="http://batiste.dosimple.ch/blog/2007-09/" target="_blank"><img class="alignnone size-full wp-image-6696" title="Light Weight RTE Jquery" src="http://superdit.com/wp-content/uploads/2011/05/05-rich-text-editor-jquery.png" alt="Light Weight RTE Jquery" width="391" height="224" /></a></p>
<p><a href="http://batiste.dosimple.ch/blog/2007-09/" target="_blank">visit</a> | <a href="http://batiste.dosimple.ch/blog/posts/2007-09-11-1/rich-text-editor-jquery.html" target="_blank">demo</a> | <a href="http://batiste.dosimple.ch/blog/posts/2007-09-11-1/jquery.rte.js" target="_blank">download</a></p>
<h5>6. uEditor</h5>
<p><a href="http://www.upian.com/upiansource/ueditor/en" target="_blank"><img class="alignnone size-full wp-image-6697" title="ueditor" src="http://superdit.com/wp-content/uploads/2011/05/06-ueditor.png" alt="ueditor" width="461" height="285" /></a></p>
<p><a title="uEditor" href="http://www.upian.com/upiansource/ueditor/en" target="_blank">visit</a> | <a title="ueditor demo" href="http://www.upian.com/upiansource/ueditor/demo/" target="_blank">demo</a> | <a title="ueditor download" href="http://www.upian.com/upiansource/ueditor/files/uEditor.zip" target="_blank">download</a></p>
<h5>7. CLEditor</h5>
<p><a href="http://premiumsoftware.net/cleditor/" target="_blank"><img class="alignnone size-full wp-image-6698" title="cleditor" src="http://superdit.com/wp-content/uploads/2011/05/07-cleditor.png" alt="cleditor" width="535" height="215" /></a></p>
<p><a title="CLEditor" href="http://premiumsoftware.net/cleditor/" target="_blank">visit</a> | <a title="CLEditor demo" href="http://premiumsoftware.net/cleditor/" target="_blank">demo</a> | <a title="CLEditor Donwload" href="http://premiumsoftware.net/cleditor/downloads/CLEditor1_3_0.zip" target="_blank">download</a></p>
<h5>8. LWRTE</h5>
<p><a href="http://code.google.com/p/lwrte/" target="_blank"><img class="alignnone size-full wp-image-6699" title="lwrte" src="http://superdit.com/wp-content/uploads/2011/05/08-lwrte.png" alt="lwrte" width="540" height="330" /></a></p>
<p><a title="lwrte" href="http://code.google.com/p/lwrte/" target="_blank">visit </a>| <a href="http://code.google.com/p/lwrte/downloads/list" target="_blank">download</a></p>
<h5>9. HtmlBox</h5>
<p><a href="http://remiya.com/htmlbox/" target="_blank"><img class="alignnone size-full wp-image-6700" title="htmlbox" src="http://superdit.com/wp-content/uploads/2011/05/09-htmlbox.png" alt="htmlbox" width="540" height="259" /></a></p>
<p><a title="htmlbox" href="http://remiya.com/htmlbox/" target="_blank">visit</a> | <a title="htmlbox demo" href="http://remiya.com/htmlbox/index.php/3/demo.html" target="_blank">demo</a> | <a title="htmlbox download" href="http://remiya.com/htmlbox/index.php/2/download.html" target="_blank">download</a></p>
<h5>10. CSS3 Jquery RTE</h5>
<p><a href="https://launchpad.net/css3-jrte" target="_blank"><img class="alignnone size-full wp-image-6701" title="CSS3 JQuery RTE" src="http://superdit.com/wp-content/uploads/2011/05/10-CSS3-JQuery-RTE.png" alt="CSS3 JQuery RTE" width="540" height="309" /></a></p>
<p><a href="https://launchpad.net/css3-jrte" target="_blank">visit</a> | <a href="http://launchpad.net/css3-jrte/0.1/0.1/+download/css3-jrte.jquery.tar.gz" target="_blank">download</a></p>
<h5>11. Damn Small Rich Text Editor</h5>
<p><a href="http://avidansoft.com/_en/scripts" target="_blank"><img class="alignnone size-full wp-image-6702" title="damn small rte" src="http://superdit.com/wp-content/uploads/2011/05/11-damn-small-rte.png" alt="damn small rte" width="540" height="267" /></a></p>
<p><a href="http://avidansoft.com/_en/scripts" target="_blank">visit</a> | <a href="http://avidansoft.com/dsrte/dsrte.tar.bz2" target="_blank">download</a></p>
<h5>12. jQuery WYSIWYG Rich Text Editor</h5>
<p><a href="http://jqframework.com/jqrte" target="_blank"><img class="alignnone size-full wp-image-6703" title="jqrte" src="http://superdit.com/wp-content/uploads/2011/05/12-jqrte.png" alt="jqrte" width="522" height="224" /></a></p>
<p><a href="http://jqframework.com/jqrte" target="_blank">visit</a> | <a href="http://jqframework.com/jqrte_demo.html" target="_blank">demo</a> | <a href="http://jqframework.com/jqrte" target="_blank">download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/05/21/12-jquery-based-rich-text-editor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sliding Stacked Images With JQuery</title>
		<link>http://superdit.com/2011/05/14/sliding-stacked-images-with-jquery/</link>
		<comments>http://superdit.com/2011/05/14/sliding-stacked-images-with-jquery/#comments</comments>
		<pubDate>Sat, 14 May 2011 01:09:53 +0000</pubDate>
		<dc:creator>aditia rahman</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://superdit.com/?p=6433</guid>
		<description><![CDATA[A sliding door effect can be used what the site offer. About a week ago I visited a site called auroraos, on the first page I see a nice sliding image gallery on the front page, it used JQuery to creating the effect, it like a vertical accordion, sliding door effect or whatever you called<a href="http://superdit.com/2011/05/14/sliding-stacked-images-with-jquery/" class="read-more">Continue Reading</a>]]></description>
			<content:encoded><![CDATA[<p>A sliding door effect can be used what the site offer. About a week ago I visited a site called <a title="auroraos" href="http://www.auroraos.org/" target="_blank">auroraos</a>, on the first page I see a nice sliding image gallery on the front page, it used JQuery to creating the effect, it like a vertical accordion, sliding door effect or whatever you called it.</p>
<p><a title="Sliding Stacked Images With JQuery" href="http://superdit.com/2011/05/14/sliding-stacked-images-with-jquery/"><img class="alignnone size-full wp-image-6589" title="jquery sliding stacked images" src="http://superdit.com/wp-content/uploads/2011/05/jquery_sliding_stacked_images_thumb.png" alt="jquery sliding stacked images" width="540" height="200" /></a></p>
<p>All the images must have the same size, in both width and height, the hovered images will shows entirely, and the others will mostly hidden.<span id="more-6433"></span></p>
<p style="text-align: center;"><a title="JQuery Sliding Stacked Images Demo" href="http://demo.superdit.com/jquery/sliding_stacked/" target="_blank">View Demo</a> | <a title="JQuery Sliding Stacked Images Download" href="http://www.box.net/shared/qnlkg3bk5d" target="_blank">Download Source</a></p>
<h5>HTML</h5>
<p>In this example I&#8217;m using 5 images, like before we have to set the <em>overflow</em> css property to <em>hidden</em> so all the images can be expanded in the background, you can see on the CSS code section.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;container&quot;&gt;
    &lt;div id=&quot;img_container&quot;&gt;
        &lt;img id=&quot;img1&quot; src=&quot;img/01.jpg&quot;/&gt;
        &lt;img id=&quot;img2&quot; src=&quot;img/02.jpg&quot;/&gt;
        &lt;img id=&quot;img3&quot; src=&quot;img/03.jpg&quot;/&gt;
        &lt;img id=&quot;img4&quot; src=&quot;img/04.jpg&quot;/&gt;
        &lt;img id=&quot;img5&quot; src=&quot;img/05.jpg&quot;/&gt;
    &lt;/div&gt;
&lt;/div&gt;
</pre>
<h5>JQuery</h5>
<p>This example set all the images position using JQuery, on the <em>$(document).ready();</em> function, to make it easier where to move the images when an images hover, I set all the position in array. And there is two recursive function i used here, they are used when JQuery must loop on the prev and next images until no images found anymore.</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {
    var cwidth = parseInt($(&quot;#container&quot;).css(&quot;width&quot;).replace(&quot;px&quot;, &quot;&quot;));
    var img_count = $(&quot;#img_container&quot;).children().length;
    var img_width = $(&quot;#img1&quot;).width();
    var divider = cwidth / img_count;
    var small_space = (cwidth - img_width) / (img_count - 1);

    // set position
    var cssleft = Array();
    $(&quot;#img_container img&quot;).each(function(index) {
        cssleft[index] = new Array();
        // set default position
        cssleft[index][0] = (index * divider) - (index * img_width);
        $(this).css(&quot;left&quot;, cssleft[index][0] + &quot;px&quot;);

        // set left position
        cssleft[index][1] = (index * small_space) - (index * img_width);

        // set right position
        var index2 = index;
        if (index2 == 0) {
            index2++;
        }
        cssleft[index][2] = cssleft[index2 - 1][1];
    });

    // image hover
    $(&quot;#img_container img&quot;).mouseenter(function() {
        var img_id = parseInt($(this).attr(&quot;id&quot;).replace(&quot;img&quot;, &quot;&quot;)) - 1;

        if ($(this).attr(&quot;id&quot;) != &quot;img1&quot;) {
            $(this).animate({
                left: cssleft[img_id][1]
            }, 300);
        }
        loopNext(this);
        loopPrev(this);
    });

    // image container hover out back to default position
    $(&quot;#img_container&quot;).mouseleave(function() {
        $(&quot;#img_container img&quot;).each(function(index) {
            $(this).animate({
                left: cssleft[index][0]
            }, 300);
        });
    });

    function loopPrev(el) {
        if ($(el).prev().is(&quot;img&quot;)) {
            var imgprev_id = parseInt($(el).attr(&quot;id&quot;).replace(&quot;img&quot;, &quot;&quot;));

            if ($(el).prev().attr(&quot;id&quot;) != &quot;img1&quot;) {
                $(el).prev().animate({
                    left: cssleft[imgprev_id - 2][1]
                }, 300);
            }
            loopPrev($(el).prev());
        }
    }

    function loopNext(el) {
        if ($(el).next().is(&quot;img&quot;)) {
            var imgnext_id = parseInt($(el).attr(&quot;id&quot;).replace(&quot;img&quot;, &quot;&quot;));

            $(el).next().animate({
                left: cssleft[imgnext_id][2]
            }, 300);
            loopNext($(el).next());
        }
    }
});
</pre>
<h5>CSS</h5>
<p>I&#8217;m using the box shadow effect to the space between each image, so not to get confused.</p>
<pre class="brush: css; title: ; notranslate">
#container {
    margin: 0 auto;
    margin-top: 50px;
    width: 800px;
    height: 350px;
    overflow: hidden;
    border: 10px solid #000;
    -webkit-border-radius: .5em;
    -moz-border-radius: .5em;
    border-radius: .5em;
}
#img_container {
    width: 4000px;
}
#img_container img {
    position: relative;
    -moz-box-shadow: -5px 0 10px #000;
    -webkit-box-shadow: -5px 0 10px #000;
    box-shadow: -5px 0 10px #000;
    width: 600px;
}
#img1 { z-index: 0; }
#img2 { z-index: 1; }
#img3 { z-index: 2; }
#img4 { z-index: 3; }
#img5 { z-index: 4; }
</pre>
<p style="text-align: center;"><a title="JQuery Sliding Stacked Images Demo" href="http://demo.superdit.com/jquery/sliding_stacked/" target="_blank">View Demo</a> | <a title="JQuery Sliding Stacked Images Download" href="http://www.box.net/shared/qnlkg3bk5d" target="_blank">Download Source</a></p>
<p style="text-align: center;"><a title="JQuery Sliding Stacked Images Demo" href="http://demo.superdit.com/jquery/sliding_stacked/" target="_blank"><img class="size-full wp-image-6595" title="jquery sliding stacked images" src="http://superdit.com/wp-content/uploads/2011/05/jquery_sliding_stacked_images_big.png" alt="jquery sliding stacked images" width="540" height="252" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://superdit.com/2011/05/14/sliding-stacked-images-with-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

