Please see my comment to Solution 3. You would need some little fixes to it:
First, to show one of the
div
elements from the very beginning, you can, for example, remove
style="display:none"
from one of them. Then, you probably need to enable/disable buttons properly, because, at the very beginning, "Previous" makes no sense, and, at the very end, "Next" makes no sense. You can do it using jQuert
.prop()
function; for example:
btnPrevious = $("#btnPrevious");
btnNext = $("#btnNext");
btnPrevious.prop("disabled", true);
btnNext.prop("disabled", false);
—SA