Note that there are some explanatory texts on larger screens.

plurals
  1. POCarousel Next with a Back to Top Feature
    primarykey
    data
    text
    <p><strong>I have added Bootstrap Carousel and a Back to Top Button to my rails app. Everything works perfect.</strong> </p> <pre><code>Is there anyway in which I can combine Bootstraps Carousel's Next Button with my Back to Top button? Or perhaps add this functionality to the Carousel Next Buttons? </code></pre> <p>Allowing a user to turn the page with Carousel's Next Button, without having to scroll up to read the next page every time he starts a new page. </p> <p>New to Rails, Please help :)</p> <p><strong>This is my code...</strong></p> <p><strong>VIEWS</strong> (Show.html.erb)</p> <pre><code>&lt;div id="top"&gt;&lt;/div&gt; &lt;div id="message"&gt; &lt;a href="#"&gt;&lt;%= image_tag("Back_to_Top.png", alt: "rss feed") %&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="row"&gt; &lt;div class="span12"&gt; &lt;div class="container fill"&gt; &lt;div id="myCarousel" class="carousel slide"&gt; &lt;div class="carousel-inner"&gt; &lt;div class="active item"&gt; &lt;div class="fill" style="background-image:url('//placehold.it//000000/FFF');"&gt; &lt;div class="container"&gt; &lt;div class="center"&gt;&lt;%= image_tag @book.titlephoto.url(:original) %&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;% unless @book.book_images.blank? %&gt; &lt;% @book.book_images.each do |image| %&gt; &lt;div class="item"&gt; &lt;div class="fill" style="background-image:url('//placehold.it/1024x700/000000');"&gt; &lt;div class="container"&gt; &lt;div class="center"&gt;&lt;%= image_tag image.page.url(:original) %&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;% end %&gt; &lt;% end %&gt; &lt;/div&gt; &lt;div class="pull-center"&gt; &lt;a class="carousel-control left" href="#myCarousel" data-slide="prev"&gt;‹&lt;/a&gt; &lt;a class="carousel-control right" href="#myCarousel" data-slide="next"&gt;›&lt;/a&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload