반응형

 

Slidesjs - 원하는 페이지로 이동시킬때.

http://www.slidesjs.com/

 

 

 

 

http://stackoverflow.com/questions/16043600/refresh-slidejs

 

$('#SLIDESID').slidesjs({
    //...
});

// ... later somewhere else ... //

var currentIndex = $('#SLIDESID').data().plugin_slidesjs.data.current;

//remove active tab
$('#SLIDESID [slidesjs-index="' + currentIndex + '"]').remove();
$('#SLIDESID [data-slidesjs-item="' + currentIndex  + '"]').parent().remove();

//reindex tabs
var tabs = $('#SLIDESID [slidesjs-index]');
tabs.each(function(idx, elem){
    $(elem).attr('slidesjs-index', idx);
});

//reindex pagination
$('#SLIDESID [data-slidesjs-item]').each(function(idx, elem){
    $(elem).attr('data-slidesjs-item', idx);
    $(elem).text(idx+1);
});

//tweek plugin data
$('#SLIDESID').data().plugin_slidesjs.data.total = tabs.length;
$('#SLIDESID').data().plugin_slidesjs.data.current--;

//animate to new element by clicking on NEXT
$('#SLIDESID .slidesjs-next').click();
반응형

+ Recent posts