<?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>mFabrik - mobile sites, apps, HTML5 and CMS software development &#187; jquery</title>
	<atom:link href="http://blog.mfabrik.com/category/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mfabrik.com</link>
	<description>Freedom delivered.</description>
	<lastBuildDate>Wed, 03 Aug 2011 09:47:41 +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>Simple image roll-over effect with jQuery</title>
		<link>http://blog.mfabrik.com/2011/05/26/simple-image-roll-over-effect-with-jquery/</link>
		<comments>http://blog.mfabrik.com/2011/05/26/simple-image-roll-over-effect-with-jquery/#comments</comments>
		<pubDate>Thu, 26 May 2011 09:18:00 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[plone]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[effect]]></category>
		<category><![CDATA[hover]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[mouseout]]></category>
		<category><![CDATA[mouseover]]></category>
		<category><![CDATA[roll over]]></category>
		<category><![CDATA[rollover]]></category>
		<category><![CDATA[tinymce]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=1268</guid>
		<description><![CDATA[Here is a simple jQuery method to enable image roll-over effects (hover). This method is suitable for content editors who can add images only through TinyMCE or normal upload -  naming image files specially is the only requirement. No CSS, Javascript or other knowledge needed by the person who needs to add the images with [...]]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>Here is a simple jQuery method to enable image roll-over effects (hover). This method is suitable for content editors who can add images only through TinyMCE or normal upload -  naming image files specially is the only requirement. No CSS, Javascript or other knowledge needed by the person who needs to add the images with roll-overs.</p>
<p>Just include this script on your HTML page and it will automatically scan image filenames, detects image filenames with special roll-over marker strings and then applies the roll-over effect on them. Roll-over images are preloaded to avoid image blinking on slow connections.</p>
<p>The script:</p>
<pre class="literal-block">/**
 * Automatic image hover placement with jQuery
 *
 * If image has -normal tag in it's filename assume there exist corresponding
 * file with -hover in its name.
 *
 * E.g. http://host.com/test-normal.gif -&gt; http://host.com/test-hover.gif
 *
 * This image is preloaded and shown when mouse is placed on the image.
 *
 * Copyright Mikko Ohtamaa 2011
 *
 * http://twitter.com/moo9000
 */

(function (jQuery) {
        var $ = jQuery;

        // Look for available images which have hover option
        function scanImages() {
                $("img").each(function() {

                        $this = $(this);

                        var src = $this.attr("src");

                        // Images might not have src attribute, if they
                        if(src) {

                                // Detect if this image filename has hover marker bit
                                if(src.indexOf("-normal") &gt;= 0) {

                                        console.log("Found rollover:" + src);

                                        // Mangle new URL for over image based on orignal
                                        var hoverSrc = src.replace("-normal", "-hover");

                                        // Preload hover image
                                        var preload = new Image(hoverSrc);

                                        // Set event handlers

                                        $this.mouseover(function() {
                                                this.src = hoverSrc;
                                        });

                                        $this.mouseout(function() {
                                                this.src = src;
                                        });

                                }
                        }
                });
        }

        $(document).ready(scanImages);

})(jQuery);</pre>
</div>
<p class="signature">
<a href="http://mfabrik.com/@@zoho-contact-form"><img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/mfabrik-24.png"></a> <a href="http://mfabrik.com/@@zoho-contact-form">Get developers</a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml"><img valign="middle" src="http://www.feedburner.com/fb/images/pub/feed-icon16x16.png" alt="" style="vertical-align:middle;border:0"/></a> <a href="http://feeds.feedburner.com/mFabrikWebAndMobileDevelopment" rel="alternate" type="application/rss+xml">Subscribe mFabrik blog in a reader</a> <a href="http://twitter.com/mfabrik"> <img valign="middle"  src="http://blog.mfabrik.com/wp-content/uploads/twitter-24.png"></a> <a href="http://twitter.com/moo9000">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2011/05/26/simple-image-roll-over-effect-with-jquery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>domgen &#8211; Creating HTML with Javascript without DOM API</title>
		<link>http://blog.mfabrik.com/2010/09/02/domgen-creating-html-with-javascript-without-dom-api/</link>
		<comments>http://blog.mfabrik.com/2010/09/02/domgen-creating-html-with-javascript-without-dom-api/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 12:43:41 +0000</pubDate>
		<dc:creator>Jussi Toivola</dc:creator>
				<category><![CDATA[browser]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.mfabrik.com/?p=730</guid>
		<description><![CDATA[Tired of using Javascript DOM API for generating HTML dynamically? Meet domgen. domgen is a tool for easy dynamic content generation via Javascript. It generates DOM elements from dictionary specification similar to HTML and eliminates the need for cumbersome DOM Javascript API. domgen uses a simple specification to generate the HTML. In some cases it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Tired of using Javascript DOM API for generating HTML dynamically? Meet <a href="https://bitbucket.org/mfabrik/domgen">domgen</a>. domgen is a tool for easy dynamic content generation via Javascript. It generates DOM elements from dictionary specification similar to HTML and eliminates the need for cumbersome DOM Javascript API.</p>
<p>domgen uses a simple specification to generate the HTML. In some cases it&#8217;s more reliable to use DOM API to generate HTML instead of using innerHTML. We have had problems especially with iPhone when using innerHTML.<br />
See for example <a href="http://pastebin.com/LLk3J0iH">http://pastebin.com/LLk3J0iH</a> or google &#8220;iPhone innerHTML&#8221; for more info. In fact, innerHTML is not even part of the HTML standard even though it exists on every browser.</p>
<p>So if you want to add dynamic HTML properly, you should use the <a href="http://www.w3schools.com/jsref/dom_obj_all.asp">Javascript DOM API</a>. Consider the following short HTML where the contents inside body had to be generated:</p>
<pre>&lt;body&gt;
    &lt;div id="mydiv"&gt;my div&lt;/div&gt;
&lt;/body&gt;</pre>
<p>Using Javascript DOM API:</p>
<pre>// Get the body tag
var body = document.getElementsByTagName("body")[0];
// Create 'div' element
var mydiv = document.createElement("div");
mydiv.setAttribute("id", "mydiv");
mydiv.innerText = "my div";
// Attach the div to body
body.appendChild(mydiv);</pre>
<p>And using domgen:</p>
<pre>var spec = [
    'div',
    {
        id : 'mydiv',
        _innerText : 'my div'
    }
];
domgen.generate( domgen.get("body")[0], spec);
// or with jQuery
domgen.generate( $("body")[0], spec);</pre>
<p>To me, domgen seems a lot easier to read and work with. Get code and more examples here: <a href="https://bitbucket.org/mfabrik/domgen">https://bitbucket.org/mfabrik/domgen</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/09/02/domgen-creating-html-with-javascript-without-dom-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a drag&#8217;n&#039;drop basket with jQueryUI</title>
		<link>http://blog.mfabrik.com/2010/01/05/creating-a-dragndrop-basket-with-jqueryui/</link>
		<comments>http://blog.mfabrik.com/2010/01/05/creating-a-dragndrop-basket-with-jqueryui/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 12:53:07 +0000</pubDate>
		<dc:creator>Mikko Ohtamaa</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[jqueryui]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[basket]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[google.code]]></category>
		<category><![CDATA[shopping cart]]></category>
		<category><![CDATA[travel planner]]></category>

		<guid isPermaLink="false">http://blog.twinapex.fi/?p=401</guid>
		<description><![CDATA[I have created an example how to create a &#8220;basked&#8221; with jQuery and jQueryUI with the following features The user can be pick items from the predefined set Items are dragged and dropped to the basket The basket value reflects a hidden input This kind of user interface pattern is suitable for Shopping carts Travel [...]]]></description>
			<content:encoded><![CDATA[<p>I have created an example how to create a &#8220;basked&#8221; with jQuery and jQueryUI with the following features</p>
<ul>
<li>The user can be pick items from the predefined set</li>
<li>Items are dragged and dropped to the basket</li>
<li>The basket value reflects a hidden input</li>
</ul>
<p>This kind of user interface pattern is suitable for</p>
<ul>
<li>Shopping carts</li>
<li>Travel planners</li>
</ul>
<p>The example in fact bears the name &#8220;travel planner&#8221; but it is not tied to travel anyhow.</p>
<p><strong>Note: this is just a screenshot </strong>- please see l<a href="http://blog.twinapex.fi/wp-content/uploads/2010/01/index.html">ive example</a></p>
<p><a href="http://blog.twinapex.fi/wp-content/uploads/2010/01/basket.png"><img class="alignnone size-full wp-image-409" title="basket" src="http://blog.twinapex.fi/wp-content/uploads/2010/01/basket.png" alt="basket" width="500" height="298" /></a></p>
<p>The example code uses</p>
<ul>
<li><a href="http://code.google.com/apis/ajaxlibs/documentation/">google.code() content delivery network</a> to load jQuery and jQueryUI</li>
<li>jQueryUI draggable and droppable features</li>
<li>Well planned visual cues for the drag and drop operations: cursor changes, CSS hover classes</li>
<li>&lt;form&gt; which &lt;input&gt; value is updated according to the basket content &#8211; all selected item ids form a comma separated list</li>
</ul>
<p>The example code is well-documented with links to the further documentation.</p>
<ul>
<li><a href="http://blog.twinapex.fi/wp-content/uploads/2010/01/index.html">Live example</a></li>
<li><a href="http://code.google.com/p/jquerybaskedexample/source/browse/trunk/">View source code</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mfabrik.com/2010/01/05/creating-a-dragndrop-basket-with-jqueryui/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

