(function() {

// MAXB.NET LABS

})();

javascript, jquery, ycodaslider

YCodaSlider 3.0 – Click’n’Play + Autoplay

Posted on by Massimiliano Balestrieri | Comments

Ecco due snippets di codice per avere l’autoplay dello “slider” e il play sul click sull’immagine.
Per ora sono snippets di codice esterni alla libreria.
Nella futura versione ci saranno le opzioni

  • autoplay
  • clicknplay (ycodagallery)


AUTOPLAY GALLERY + LAZYLOAD

jQuery(window).ycodacss('ycodaslider-3.0.css');
jQuery(window).ycodacss('ycodaslider-3.0.css');
jQuery(document).ready(function() {
	jQuery("#panel-gallery")
    .ycodagallery()
    .ycodalazy();
});
jQuery(window).bind("load", function() {
    jQuery("#panel-gallery")
    .ycodaslider({
    	navigator: false,
    	arrows : false
    });

    setInterval(function(){
    	jQuery("#panel-gallery").ycodaslider("right");
    }, 2000);
});

AUTOPLAY SLIDER

jQuery(window).ycodacss('ycodaslider-3.0.css');
jQuery(window).bind("load", function() {
    jQuery("div.ycodaslider")
    .ycodaslider({arrows: false, navigator: false});

    setInterval(function(){
    	jQuery("div.ycodaslider").ycodaslider("right");
    }, 2000);
});

CLICK’N'PLAY

jQuery(window).ycodacss('ycodaslider-3.0.css');
jQuery(window).bind("load", function() {
    jQuery("#panel-gallery")
    .ycodagallery()
    .ycodaslider({navigator: false, arrows: false});

    jQuery("#panel-gallery").find("img").wrap('<a href="#">');
    jQuery("#panel-gallery").find("a").click(function(){
    	jQuery("#panel-gallery").ycodaslider("right");
    	return false;
    });
});
This entry was posted in javascript, jquery, ycodaslider and tagged , , . Bookmark the permalink.