Kod
jQuery('#rss_action_icon').click(function () {
jQuery('#rss_pasek_wiadomosci').slideToggleWidth();
});
jQuery.fn.extend({
slideRight: function() {
return this.each(function() {
jQuery(this).animate({width: 'show'},2000);
});
},
slideLeft: function() {
return this.each(function() {
jQuery(this).animate({width: 'hide'},2000);
});
},
slideToggleWidth: function() {
return this.each(function() {
var el = jQuery(this);
if (el.css('display') == 'none') {
el.slideRight();
} else {
el.slideLeft();
}
});
}
});
jQuery('#rss_pasek_wiadomosci').slideToggleWidth();
});
jQuery.fn.extend({
slideRight: function() {
return this.each(function() {
jQuery(this).animate({width: 'show'},2000);
});
},
slideLeft: function() {
return this.each(function() {
jQuery(this).animate({width: 'hide'},2000);
});
},
slideToggleWidth: function() {
return this.each(function() {
var el = jQuery(this);
if (el.css('display') == 'none') {
el.slideRight();
} else {
el.slideLeft();
}
});
}
});
Niestety zwija mi z prawej do lewej - jak odwrócić kierunek?