Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // old function
- $('.slideshow-timeline a').click(function() {
- var target_id = $(this).attr('href');
- removeClasses();
- $($(".tour-panel")[current]).addClass("fadeOutRight");
- setTimeout(function() {
- $(target_id).addClass("active-tour fadeInLeft");
- }, 50);
- setTimeout(function() {
- $($(".tour-panel")[current]).removeClass("fadeOutRight");
- }, 750);
- current = target_id.split('-')[1] || 0;
- });
- // new function
- $('.slideshow-timeline a').click(function() {
- var target_id = $(this).attr('href');
- removeClasses();
- $($(".tour-panel")[current]).addClass("fadeOutLeft");
- current = parseInt(target_id.split('-')[1]) || 0; // change here
- setTimeout(function() {
- $($(".tour-panel")[current]).addClass("active-tour fadeInRight");
- }, 50);
- // ################################
- // this part wasn't essentially necessary, but you can uncomment it if you need/want it
- /*
- setTimeout(function() {
- $($(".tour-panel")[previousIndex()]).removeClass("active-tour fadeOutLeft");
- }, 750);
- */
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement