javascript - jQuery to show a div and hide another div at the same time. Purpose to browse a 5 div's -
assume there book has various chapters (say 5) in it. complete book present in single html page 5 chapters in it. each chapter html content , present inside div class name called chapter. can take dummy html content each of 5 pages tags in chapter 1, chapter 2 ..... , chapter 5.
now when page opens first chapter shown user. has chapter 1 in heading. single chapter bigger height of window user can scroll read chapter. once user reaches end of chapter user can not see or scroll next chapter.
when user @ end of chapter sees button @ bottom right saying go next chapter. imp:- button can not part of chapter html has generated programmatically @ end of chapter via js.
when person clicks on button next chapter (chapter 2 in case) should scroll bottom automatically till top pushing first page out of window. whole screen should covered chapter 2 shown animation pushing chapter 1 above.
so @ given time user can see 1 chapter scrolling or down. have click buttons access next or previous chapter.
similarly chapter 2 there button @ top of page go chapter 1 in chapter 1 come top pushing chapter2 down out of window. , chapter 2 there button @ bottom of page clicking on user taken chapter 3 in similar animation format.
this sort of interaction user have while reading book. please me. need urgently. thanks!
u dont need write lot of code. try jquery's accordian plugin http://jqueryui.com/accordion/
Comments
Post a Comment