Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other AnythingSlider – possible 2 menus? Re: AnythingSlider – possible 2 menus?

#111756
Mottie
Member

LOL I’m glad you’re having fun :P

Ok, try this code ([demo](http://jsfiddle.net/Mottie/ycUB6/1816/))

var updateSecondMenu = function(e, slider) {
$(‘#anythingControlsTop a’)
.removeClass(‘cur’)
.eq(slider.targetPage).addClass(‘cur’);
// update start/stop button
$(‘#anythingControlsTop a.start-stop’)
.toggleClass(‘playing’, slider.playing)
.find(‘span’).html( slider.playing ? slider.options.stopText : slider.options.startText );
// update navigation window
slider.navWindow(slider.targetPage);
};

$(‘#slider’).anythingSlider({
// Callback when the plugin finished initializing
onInitialized: function(e, slider) {
var dupe = slider.$controls.clone(true);
dupe.attr(‘id’, ‘anythingControlsTop’);
slider.$window.before(dupe);
slider.$controls = slider.$controls.add(dupe);
},
onSlideInit: updateSecondMenu,
onShowStop: updateSecondMenu,
navigationSize: 3
});‚Äč