javascript - How to toggle a section of a page so goes from one passage of text to another passage of text? -
i create section of page (a passage of text) toggles through passages of text have without reloading page or loading page. ideally, use left , right arrows.
so, suppose have ten passages of text, passage a, passage b, , on, if clicks right arrow, want move passage passage b, if click right arrow again, want move passage b passage c. left arrow used go previous passages.
how can this?
i comfortable using css, html, javascript, jquery, , bootstrap.
i cannot take credit this:
i googled "bootstrap text slider" , wa-la link popped http://jsfiddle.net/technotarek/gxn2u/
javascript
setcarouselheight('#carousel-example'); function setcarouselheight(id) { var slideheight = []; $(id+' .item').each(function() { // add slide heights array slideheight.push($(this).height()); }); // find tallest item max = math.max.apply(null, slideheight); // set slide's height $(id+' .carousel-content').each(function() { $(this).css('height',max+'px'); }); }
Comments
Post a Comment