<?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>Davide Caffaratti blog &#187; mootools</title>
	<atom:link href="http://davidecaffaratti.com/category/mootools/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidecaffaratti.com</link>
	<description>My own personal blog and my works</description>
	<lastBuildDate>Fri, 12 Mar 2010 02:40:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>mootools Edit In Place</title>
		<link>http://davidecaffaratti.com/2009/10/26/mootools-edit-in-place/</link>
		<comments>http://davidecaffaratti.com/2009/10/26/mootools-edit-in-place/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 03:41:58 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[eip]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=400</guid>
		<description><![CDATA[Here is my Mootools class that I use for make edit in place text. VIEW THE EXAMPLE FILE Use this class is very simple: First need to have mootools 1.2 javascript library Second download MooEip class The class: var MooEip = new Class({ //implements Implements: [Options,Events], //options options: { elements: '.eip', styleHover: 'eip-hover', styleInput: 'eip-input', [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my <a href="http://mootools.net" target="_blank">Mootools</a> class that I use for make edit in place text.</p>
<p><strong><a href="http://davidecaffaratti.com/mootools/moo-eip/">VIEW THE EXAMPLE FILE</a></strong></p>
<p>Use this class is very simple:</p>
<p>First need to have <a href="http://mootools.net/core" target="_blank">mootools 1.2</a> javascript library<br />
Second download MooEip class</p>
<a href="http://davidecaffaratti.com/upload/moo-eip.zip" title="download mootools Eip"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 43.19 KB<br /><b>Hits :</b> 162</div><br style="clear:both;" />
<p><span id="more-400"></span></p>
<h3>The class:</h3>
<pre class="brush: jscript;">
var MooEip = new Class({

    //implements
    Implements: [Options,Events],

    //options
    options: {
        elements: '.eip',
        styleHover: 'eip-hover',
        styleInput: 'eip-input',
        styleTextarea: 'eip-textarea',
        styleLoading: 'eip-loading',
        idPrefix: 'id_',
        inputSave: 'Save',
        inputCanc: 'Cancel',
        saving: 'Saving...',
        empty: 'Click to Edit',
        hoverColor: '#ceffef',
        leaveColor: '#ffffff'
    },

    //initialization
    initialize: function(ajaxUrl, options) {
        // set ajax url
        this.ajaxUrl = ajaxUrl;
        //set options
        this.setOptions(options);

        this.run();
    },

    //a method that does whatever you want
    run: function() {
        //find the editable areas
        $$(this.options.elements).each(function(el) {
            var elId = el.getProperty('id');
            var elValue = el.get('text').trim();

            if (elValue.trim() == ''){
                el.set('text', this.options.empty);
            }

            if (el.getStyle('display') != '') {
                var displayStyle = el.getStyle('display');
            }
            else {
                var displayStyle = el.setStyle('display', 'block');
            }

            var editForm = new Element('form', {
                'name': 'form_' + elId,
                'events': {
                    'submit': function(e) {
                        el.setStyle('display', 'block');
                        //el.fireEvent('mouseleave');
                        e.preventDefault();

                        var request = new Request({
                            url: this.ajaxUrl,
                            data: 'value=' + editForm.fieldValue.value,
                            method: 'post',
                            onRequest: function(){
                                el.addClass(this.options.styleLoading);
                                el.set('text', this.options.saving);
                            }.bind(this),
                            onSuccess: function(){
                                el.removeClass(this.options.styleLoading);
                                el.set('html', (editForm.fieldValue.value.trim() == '' ? this.options.empty : editForm.fieldValue.value.trim().replace(new RegExp('\n', 'gi'), '&lt;br /&gt;')));
                            }.bind(this),
                            onFailure: function(resp){
                                el.removeClass(this.options.styleLoading);
                                alert('ERROR ON THE SERVER !!\nCODE: ' + resp.status + ' - TEXT: ' + resp.statusText + '\nPLEASE SAVE THE TEXT AGAIN !!');
                                el.set('html', (editForm.fieldValue.value.trim() == '' ? this.options.empty : editForm.fieldValue.value.trim().replace(new RegExp('\n', 'gi'), '&lt;br /&gt;')));
                            }.bind(this)
                        });
                        request.send();                        

                        editForm.dispose();

                        // set the new value from submited form value
                        elValue = editForm.fieldValue.value.trim();
                    }.bind(this)
                }
            });

            if(el.hasClass('input')) {
                var editField = new Element('input', {
                    'type': 'text',
                    'name': 'fieldValue',
                    'class': this.options.styleInput
                });
            }
            else {
                var editField = new Element('textarea', {
                    'name': 'fieldValue',
                    'class': this.options.styleTextarea
                });
                if (el.get('style') != '') {
                    editField.set('style', el.get('style'));
                }
            }

            var okButton = new Element('input', {
                'id': 'ok_' + elId,
                'type': 'submit',
                'value': this.options.inputSave,
                'events' : {
                    'click': function() {
                    editForm.dispose();
                    el.setStyle('display', displayStyle);
                    el.fireEvent('mouseleave');
                    }
                }
            });

            var cancelButton = new Element('input', {
                'id': 'cancel_' + elId,
                'type': 'reset',
                'value': this.options.inputCanc,
                'events': {
                    'click': function() {
                    editForm.dispose();
                    el.setStyle('display', displayStyle);
                    el.fireEvent('mouseleave');
                    }
                }
            });

            editField.inject(editForm);
            lb = new Element('br').inject(editField, 'after');
            okButton.inject(editForm);
            cancelButton.inject(editForm);

            var myeffect = new Fx.Tween(el, {duration: 500});

            el.addEvents({
                'mouseenter': function() {
                    el.setStyle('background-color', this.options.hoverColor);
                    el.addClass('eip-hover');
                }.bind(this),

                'mouseleave': function() {
                    myeffect.start('background-color', this.options.hoverColor, this.options.leaveColor);
                    el.removeClass('eip-hover');
                }.bind(this),

                'click': function() {
                    el.setStyle('display', 'none');
                    editField.value = (el.hasClass('input')) ? elValue.trim() : elValue.trim().replace(new RegExp('&lt;br /&gt;', 'gi'),'\n');
                    editForm.inject(el, 'after');
                    editField.focus();
                    el.removeClass('eip-hover');
                }
            });
        }, this);
    }
});
</pre>
<h3>The javascript in the page:</h3>
<pre class="brush: xml;">
&lt;script src=&quot;js/mootools-1.2.3-core.js&quot; type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;js/moo-eip-min.js&quot; type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;
//&lt;![CDATA[
window.addEvent('domready', function() {
    var eip = new MooEip('edit.php');
});
//]]&gt;
&lt;/script&gt;

&lt;!-- style for moo-eip --&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/style.css&quot; /&gt;
&lt;!-- /style for moo-eip --&gt;
</pre>
<h3>The html</h3>
<pre class="brush: xml;">
&lt;div class=&quot;eip input&quot; id=&quot;id_0&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;eip&quot; id=&quot;id_1&quot; style=&quot;overflow:hidden;height:100px&quot;&gt;
this is a editable text 1 with overflow of the text hidden and height fixed in 100px.
&lt;/div&gt;
&lt;div class=&quot;eip&quot; id=&quot;id_2&quot;&gt;
this is a editable text 2.
&lt;/div&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/10/26/mootools-edit-in-place/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MooSkype 1.1</title>
		<link>http://davidecaffaratti.com/2009/07/29/mooskype-1-1/</link>
		<comments>http://davidecaffaratti.com/2009/07/29/mooskype-1-1/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 17:15:18 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=372</guid>
		<description><![CDATA[New version of moo-skype Add var ajaxProxy for set ajax proxy Add css file for style the skype buttom Add onLine example : VIEW THE EXAMPLE FILE]]></description>
			<content:encoded><![CDATA[<p>New version of moo-skype</p>
<ul>
<li>Add var <strong>ajaxProxy </strong>for set ajax proxy<strong><br />
</strong></li>
<li>Add css file for style the skype buttom</li>
</ul>
<p>Add onLine example :</p>
<p><strong></strong><strong><a href="../mootools/moo-skype/">VIEW THE EXAMPLE FILE</a></strong></p>
<p><a href="http://davidecaffaratti.com/upload/moo-skype.zip" title="download MooSkype class"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 68.42 KB<br /><b>Hits :</b> 17</div><br style="clear:both;" /><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/07/29/mooskype-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mootools fValidator with Asset</title>
		<link>http://davidecaffaratti.com/2009/06/19/mootools-fvalidator-with-asset/</link>
		<comments>http://davidecaffaratti.com/2009/06/19/mootools-fvalidator-with-asset/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 19:03:30 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[fvalidator]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=332</guid>
		<description><![CDATA[I made some modifications on the great scrip fValidator (http://pilon.nl) for charge with Assets only used languages files. Add too a compressed version of the class.]]></description>
			<content:encoded><![CDATA[<p>I made some modifications on the great scrip fValidator (<a href="http://pilon.nl" target="_blank">http://pilon.nl</a>) for charge with Assets only used languages files.</p>
<p>Add too a compressed version of the class.</p>
<a href="http://davidecaffaratti.com/upload/fValidator.zip" title="download fValidator with Asset language"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 8.48 KB<br /><b>Hits :</b> 89</div><br style="clear:both;" />
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/06/19/mootools-fvalidator-with-asset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MooSkype</title>
		<link>http://davidecaffaratti.com/2009/06/13/mooskype/</link>
		<comments>http://davidecaffaratti.com/2009/06/13/mooskype/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 02:52:56 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[skype]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=327</guid>
		<description><![CDATA[This is my new little class fot print Skype button status with mootools library. It have a nice effect for the button taken from http://davidwalsh.name/skype-mootools. Thanks David Your site is a good reference for me VIEW THE EXAMPLE FILE var MooSkype = new Class({ Implements: [Options], options: { // Flag use efect useEffect: true, // [...]]]></description>
			<content:encoded><![CDATA[<p>This is my new little class fot print Skype button status with mootools library.</p>
<p>It have a nice effect for the button taken from <a href="http://davidwalsh.name/skype-mootools" target="_blank">http://davidwalsh.name/skype-mootools</a>.</p>
<p>Thanks David Your site is a good reference for me <img src='http://davidecaffaratti.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong><a href="../mootools/moo-skype/">VIEW THE EXAMPLE FILE</a></strong></p>
<a href="http://davidecaffaratti.com/upload/moo-skype.zip" title="download MooSkype class"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 68.42 KB<br /><b>Hits :</b> 17</div><br style="clear:both;" />
<p><span id="more-327"></span></p>
<pre class="brush: plain;">var MooSkype = new Class({

Implements: [Options],

options: {
// Flag use efect
useEffect: true,
// Class name for hock skype button action
element: 'skype-button',
// Class name for the skype image
image: 'skype-image',
// Default action when user is disponible
defaultAction: 'call',
// Default language, possibles: 'en','de','fr','it','pl','ja','es','pt','pt-br','se','zh-cn','zh-tw'
language: 'en',
// Path to images
imagesPath: 'img/',
// Path to languages
languagesPath: './languages/'
},

initialize: function(options) {
this.setOptions(options);

this.setSkype();
},

setSkype: function() {
// charge js language
new Asset.javascript(this.options.languagesPath + this.options.language + '.js', {id: 'skypeLanguage'});

var href = $(this.options.element).getProperty('href');
var tmpUser = href.replace('skype:', '');
var user = tmpUser.replace(tmpUser.substring(tmpUser.lastIndexOf('?'),tmpUser.length), '');

var request = new Request({
url: 'http://localhost/moo-skype/proxy.php',
method: 'get',
data: 'user=' + user,
onFailure: function() {
this.getButton(user, 0);
}.bind(this),
onSuccess: function(resp){
this.getButton(user, resp.toInt());
}.bind(this)
});
request.send();
},

getButton: function(user, status) {
var link = $(this.options.element);
var img = $(this.options.image).clone();
var statusText = i18n[status];

switch(status){
case 2:
case 3:
case 7:
var href = link.set({'href': 'skype:' + user + '?' + this.options.defaultAction, 'title': statusText, 'text': statusText});
break;
default:
var href = link.set({'href': 'skype:' + user + '?add', 'title': statusText, 'text': statusText});
}

img.set({'src': this.options.imagesPath + status + '.gif', 'alt': statusText}).inject(href, 'top');

if (this.options.useEffect) {
this.setEffect(img);
}
},

setEffect: function(img) {
var running = false;

var fx2 = new Fx.Morph(img, {duration: 100, link: 'chain', onChainComplete:function() { running = false; } });
var fx1 = new Fx.Morph(img, {duration: 200, link: 'chain', onComplete:function() {
fx2.start({'top':'-7px'}).start({'top':'-4px'}).start({'top':'-6px'}).start({'top':'-4px'});
}
});
img.addEvent('mouseenter',function() {
if(!running) {
fx1.start({'top':'-10px'}).start({'top':'-4px'});
running = true;
}
});
}
})</pre>
<p><strong>For initialize the class use this:</strong></p>
<pre class="brush: plain;">window.addEvent('domready', function() {
var skype = new MooSkype({'language':'es'});
});</pre>
<p><strong>The html is here:</strong></p>
<pre class="brush: plain;">&lt;div&gt;
&lt;a href=&quot;skype:davcaffa?call&quot; id=&quot;skype-button&quot;&gt;
&lt;img src=&quot;img/2.gif&quot; alt=&quot;Call me&quot; id=&quot;skype-image&quot; /&gt;Call me&lt;/a&gt;
&lt;/div&gt;</pre>
<p>For use the ajax call need to use a proxy that read the state of users on skype server.</p>
<p>Here is the script:</p>
<pre class="brush: plain;">&lt;?php
if (!isset($_GET['user'])) {
echo 0;
}
else {
echo file_get_contents('http://mystatus.skype.com/'.$_GET['user'].'.num');
}
?&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/06/13/mooskype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mootools swap image 1.1.1</title>
		<link>http://davidecaffaratti.com/2009/06/11/mootools-swap-image-111/</link>
		<comments>http://davidecaffaratti.com/2009/06/11/mootools-swap-image-111/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 00:19:34 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=311</guid>
		<description><![CDATA[Little optimization for the class code and add optional transation for the images. Add example in the zip file VIEW THE EXAMPLE FILE]]></description>
			<content:encoded><![CDATA[<p>Little optimization for the class code and add optional transation for the images.</p>
<p>Add example in the zip file <img src='http://davidecaffaratti.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong><a href="http://davidecaffaratti.com/mootools/moo-swap-images/">VIEW THE EXAMPLE FILE</a></strong></p>
<a href="http://davidecaffaratti.com/upload/moo-swap-images1.zip" title="download Mootools swap images"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 98.12 KB<br /><b>Hits :</b> 440</div><br style="clear:both;" />
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/06/11/mootools-swap-image-111/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moo Slider</title>
		<link>http://davidecaffaratti.com/2009/06/09/moo-slider/</link>
		<comments>http://davidecaffaratti.com/2009/06/09/moo-slider/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 22:21:32 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Classes]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=290</guid>
		<description><![CDATA[This is my simple class for make content slider more simple. With this class can made multiple text slider and configure text, styles and more. VIEW THE EXAMPLE FILE var MooSlider = new Class({ Implements: [Options], options: { createToggle: true, tagToggle: 'a', cssHide: '.hide', cssToggle: '.toggle', slideDuration: 340, slideMode: 'vertical', slideTransitions: Fx.Transitions.Bounce.easeOut, textOpen: '+ Open', [...]]]></description>
			<content:encoded><![CDATA[<p>This is my simple class for make content slider more simple.</p>
<p>With this class can made multiple text slider and configure text, styles and more.</p>
<p><strong><a href="../mootools/moo-slider/">VIEW THE EXAMPLE FILE</a></strong></p>
<a href="http://davidecaffaratti.com/upload/moo-slider.zip" title="download Mootools slider"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 42.03 KB<br /><b>Hits :</b> 286</div><br style="clear:both;" />
<pre class="brush: plain;">
var MooSlider = new Class({

Implements: [Options],

options: {
createToggle: true,
tagToggle: 'a',
cssHide: '.hide',
cssToggle: '.toggle',
slideDuration: 340,
slideMode: 'vertical',
slideTransitions: Fx.Transitions.Bounce.easeOut,
textOpen: '+ Open',
textClose: '- Close',
elementsOpen: []
},

initialize: function(elements, options) {
this.setOptions(options);

// Set elements
this.setSlide(elements);
},

setSlide: function(elements) {
var status = {
'true': this.options.textOpen,
'false': this.options.textClose
};

$$(elements).each(function(div){

var isClose = (this.options.elementsOpen.indexOf(div.getProperty('id')) == -1);

if (this.options.createToggle) {
var link = new Element(this.options.tagToggle, { 'html': isClose?this.options.textOpen:this.options.textClose, 'class': this.options.cssToggle.replace('.',''), 'style': 'cursor:pointer;' } ).inject(div, 'top');
}
else {
var link = div.getElement(this.options.cssToggle).setStyle('cursor', 'pointer').set('class', this.options.cssToggle.replace('.',''));
}

this.hide = div.getElement(this.options.cssHide);

var fx = new Fx.Slide(this.hide, {
duration: this.options.slideDuration,
mode: this.options.slideMode,
transition: this.options.slideTransitions
})

fx.addEvent('complete', function() {
link.set('html', fx.open?status[false]:status[true]);
});

if (isClose) {
fx.hide();
}
else {
fx.show();
}

link.addEvent('click', function(e){
e.stop();
fx.toggle();
});

}, this);
}
})
</pre>
<p>For init the class use this:</p>
<pre class="brush: plain;">
&lt;script src=&quot;mootools-1.2.2-core.js&quot; type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;mootools-1.2.2.2-more.js&quot; type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;moo-slider-min.js&quot; type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;
//&lt;![CDATA[
window.addEvent('domready', function() {
&lt;pre id=&quot;line1&quot;&gt;    var slider = new MooSlider('.slide', {
    createToggle: true,
    tagToggle: 'a',
    cssHide: '.hide',
    cssToggle: '.toggle',
    slideDuration:340,
    slideMode: 'vertical',
    slideTransitions: Fx.Transitions.Pow.easeOut,
    textOpen: '+ View more',
    textClose: '- Close more',
    elementsOpen: []
    });
});
//]]&gt;&lt;/pre&gt;
&lt;/script&gt;
</pre>
<p>And this is the html for the sliders contents:</p>
<pre class="brush: plain;">
&lt;div class=&quot;slide&quot;&gt;
&lt;div class=&quot;hide&quot;&gt;
&lt;h1&gt;Slide 1&lt;/h1&gt;
This is my html code for this slide
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;slide&quot;&gt;
&lt;div class=&quot;hide&quot;&gt;
&lt;h1&gt;Slide 2&lt;/h1&gt;
This is my html code for this slide
&lt;/div&gt;
&lt;/div&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/06/09/moo-slider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RockSlideshow for mootools 1.2</title>
		<link>http://davidecaffaratti.com/2009/06/06/rockslideshow-for-mootools-12/</link>
		<comments>http://davidecaffaratti.com/2009/06/06/rockslideshow-for-mootools-12/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 00:41:12 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=287</guid>
		<description><![CDATA[I&#8217;ve see a very nice slideshow used for Jomla and want to use in my sites, but, the nice class was for mootools 1.1 &#8230; Here is the ported version for this nice slideshow]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve see a very nice slideshow used for Jomla and want to use in my sites, but, the nice class was for mootools 1.1 &#8230; Here is the ported version for this nice slideshow</p>
<a href="http://davidecaffaratti.com/upload/standalone_rokslideshow_303.zip" title="download RockSlideshow"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 228.91 KB<br /><b>Hits :</b> 337</div><br style="clear:both;" />
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/06/06/rockslideshow-for-mootools-12/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mootools swap image 1.1</title>
		<link>http://davidecaffaratti.com/2009/06/03/mootools-swap-image-11/</link>
		<comments>http://davidecaffaratti.com/2009/06/03/mootools-swap-image-11/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 01:57:26 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=275</guid>
		<description><![CDATA[Correction for the swap images class: Change the preload images at line 33 imgTemp[i] = new Element('img', {'alt': el.getProperty('alt')}).set('src', newSrc); with imgTemp[i] = new Asset.image(newSrc, {'alt':el.getProperty('alt'),'id':el.getProperty('id')});]]></description>
			<content:encoded><![CDATA[<p>Correction for the swap images class:<br />
Change the preload images at line 33</p>
<pre class="brush: plain;">

imgTemp[i] = new Element('img', {'alt': el.getProperty('alt')}).set('src', newSrc);
</pre>
<p>with</p>
<pre class="brush: plain;">

imgTemp[i] = new Asset.image(newSrc, {'alt':el.getProperty('alt'),'id':el.getProperty('id')});
</pre>
<a href="http://davidecaffaratti.com/upload/moo-swap-images1.zip" title="download Mootools swap images"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 98.12 KB<br /><b>Hits :</b> 440</div><br style="clear:both;" />
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/06/03/mootools-swap-image-11/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Mootools swap image</title>
		<link>http://davidecaffaratti.com/2009/05/09/mootools-swap-image/</link>
		<comments>http://davidecaffaratti.com/2009/05/09/mootools-swap-image/#comments</comments>
		<pubDate>Sat, 09 May 2009 23:19:12 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://davidecaffaratti.com/?p=260</guid>
		<description><![CDATA[Here is my Mootools class that I use for swap the source of an image with the same filename + &#8216;_over&#8217; before the extension (&#8216;img.jpg&#8217; will be &#8216;img_over.jpg&#8217;) work fine in firefox3, safari for windows, internet explorer 7. Use this class is very simple: First need to have mootools 1.2 javascript library Second download MooSwap [...]]]></description>
			<content:encoded><![CDATA[<p>Here is my <a href="http://mootools.net" target="_blank">Mootools</a> class that I use for swap the source of an image with the</p>
<p>same filename + &#8216;_over&#8217; before the extension (&#8216;img.jpg&#8217; will be<br />
&#8216;img_over.jpg&#8217;) work fine in firefox3, safari for windows, internet explorer 7.<br />
Use this class is very simple:</p>
<p>First need to have <a href="http://mootools.net/core" target="_blank">mootools 1.2</a> javascript library<br />
Second download MooSwap class</p>
<a href="http://davidecaffaratti.com/upload/moo-swap-images1.zip" title="download Mootools swap images"><img src="http://davidecaffaratti.com/wp-content/plugins/download-monitor/img/download.gif" alt="download" style="float:left;width:300px;" /></a><div style="float:left;width:auto;line-height:25px;margin-top:30px;margin-left:15px;"><b>Size:</b> 98.12 KB<br /><b>Hits :</b> 440</div><br style="clear:both;" />
<h3>The class:</h3>
<pre class="brush: jscript;">
var MooSwap = new Class({

//implements
Implements: [Options],

options: {
imgHoverPrefix: '_hover'
},

initialize: function(elements, options) {
//set options
this.setOptions(options);
// Set elements
this.setSwap(elements);
},

setSwap: function(elements) {

var prefix = this.options.imgHoverPrefix;

// preload images array
imgTemp = [];
i = 0;

$$(elements).each(function(el) {
var mouseFx = new Fx.Tween(el, {duration: 240, wait: false});

var holdSrc = el.getProperty('src');
var extension = holdSrc.substring(holdSrc.lastIndexOf('.'),holdSrc.length);
var newSrc = holdSrc.replace(extension, prefix + '' + extension);

// set new image for preloading
imgTemp[i] = new Asset.image(newSrc, {'alt':el.getProperty('alt'),'id':el.getProperty('id')});
//imgTemp[i] = new Element('img', {'alt': el.getProperty('alt')}).set('src', newSrc);

// default link on current img element
var link = el;

// check if there is a link a href parent
var test = el.getParent('a');
if (test) {
var link = test.setProperty('id', '__link_' + i);
}

link.addEvents({
mouseover: function() {
el.setProperty('src', newSrc);
},
mouseout: function() {
el.setProperty('src', holdSrc);
}
});

i++;
});
}
});
</pre>
<h3>The javascript in the page:</h3>
<pre class="brush: jscript;">
&lt;script src=&quot;mootools-1.2.2-core.js&quot; type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;  charset=&quot;utf-8&quot;&gt;
//&lt;![CDATA[
window.addEvent('domready', function() {
var swap = new MooSwap('.fade img', { imgHoverPrefix:'_hover' });
});
//]]&gt;
&lt;/script&gt;
</pre>
<h3>The html</h3>
<pre class="brush: xml;">
&lt;ul class=&quot;fade&quot;&gt;
&lt;li&gt;&lt;img src=&quot;my-image.jpg&quot; alt=&quot;my title&quot; /&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://mylink/&quot;&gt;&lt;img src=&quot;my-image-1.jpg&quot; alt=&quot;my title 1&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p><strong>Need to have valid</strong><br />
my-image_hover.jpg and my-image-1_hover.jpg</p>
<p>That&#8217;s all <img src='http://davidecaffaratti.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2009/05/09/mootools-swap-image/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cat-mootools</title>
		<link>http://davidecaffaratti.com/2008/08/05/hello-world/</link>
		<comments>http://davidecaffaratti.com/2008/08/05/hello-world/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 19:34:30 +0000</pubDate>
		<dc:creator>Davide</dc:creator>
				<category><![CDATA[Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://testaccount.edu/wordpress/?p=1</guid>
		<description><![CDATA[Cat-mootools is a class that y make for wrap mootools javascript using php. I want to publish it in the next month with gpl license. wait for updates &#8230;.. You can see some example HERE]]></description>
			<content:encoded><![CDATA[<p><a title="My php wrapper for mootools" href="http://davidecaffaratti.com/cat-mootools/" target="_blank">Cat-mootools</a> is a class that y make for wrap mootools javascript using php.</p>
<p>I want to publish it in the next month with gpl license.</p>
<p>wait for updates &#8230;..</p>
<p>You can see some example <a title="Example mootools" href="http://davidecaffaratti.com/cat-mootools/" target="_blank">HERE</a></p>
]]></content:encoded>
			<wfw:commentRss>http://davidecaffaratti.com/2008/08/05/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
