javascript - Making a simple slider -


how can make slider, 1 multiple photos through can navigate arrows?

i have images , arrows in page. should hide images , when arrow clicked hide current image , display next/prev?

i have images in list.

i think should go it. make own, it's best way learn how things work. here's guide simple show/hide box arrows:

  1. hide images css.
  2. show image class current.
  3. use jquery on load function add current class first element (you can handle preload or here)
  4. on arrow click assign current image variable var current = $('.imgclass.current'), remove current class images ($('.imgclass').removeclass('current')), , add current.next() or .prev(). if next() or prev() undefined, add element number 0 or $('.imgclass').length - 1 accordingly ($('.imgclass').eq(n).addclass('current')).

Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -