I have problem with my slider, ive made slider and wrote something like this:
*def index
@posts = Post.all
@asd = Post.order("created_at").last
end*
*<div class="container-fluid">
<div class="row">
<div class="col-md-8">
<ul class="bxslider">
<script type="text/javascript">
$(document).ready(function(){
$('.bxslider').bxSlider({
auto: 'true'
});
});
</script>
<% @posts.limit(2).each do |post| %>
<li>
<a href="<%= post_path(@asd)%>">
<%= image_tag ("kicius.jpg") %>
</a>
</li>
<% end %>
</ul>
</div>
<div class="col-md-4">
asd
</div>
</div>
</div>*
I want moved me to the last post when opening the first positions in slider, while the second position in slider has already be the one before last post
Aucun commentaire:
Enregistrer un commentaire