I have a jquery slider (nivo slider) that generates the next and prev button with jquery. I’m trying to add a hide() action for a div on that buttons.
$(document).ready(function(){
$(".nivo-prevNav").live('click', function() {
$("#slide3").hide();
});
});
.nivo-prevNav class is generated by the jquery function of slider
Any ideas on how I can fix this because it is not working
.live()has been deprecated. Use.on()instead:For better performance, you should call
.on()on the closest parent that’s available before the Nivo plugin runs:You should change
#nivo-wrapperto whatever element you’re calling the Nivo Slider on.