I have a plugin that I am trying to grab the the number of the current slide which will then be written to a input box with the ID of “input1” each time the slide is changed. Does my syntax make sense?
function currentSlide(){
var current = $('#slider').data('AnythingSlider').currentPage;
document.getElementById("input1").innerHTML=current;
};
If
input1is an input (as the name implies) use:Or to use jQuery only: