darsain / sly

JavaScript library for one-directional scrolling with item based navigation support.
http://darsa.in/sly
2.87k stars 497 forks source link

Is there's more clean way to do so ? #280

Open m-nasser opened 7 years ago

m-nasser commented 7 years ago
$('.myslider').sly('on', 'active', function(eventName,itemIndex){
  containers.hide(); // Im hiding some conatiners here
  var new_tab = $($(this)[0].items[itemIndex].el).attr('data-value');
  $("." + new_tab).show(); // Im showing the active one.