I am trying to use Zurb Orbit plugin for a slideshow in my rails application.
I have got a home controller in which I have got index function.
Here is my code :-
index.html.erb
<div id="myslider">
<%=image_tag("slider/pat.jpg")%>
<%=image_tag("slider/1.jpeg")%>
<%=image_tag("slider/2.jpeg")%>
</div>
home.js
$(window).load(function() {
$('#myslider').orbit();
});
application.html.erb
<%=stylesheet_link_tag "jquery.orbit.css"%>
<%= javascript_include_tag "jquery.orbit"%>
I have included the js file and css file in app/assets folder respectively
But it seems the slideshow is not working. It is a pretty simple stuff I dont know why I am not able to get the slideshow on the page.
The javascript file is getting loaded. what could be the problem?
The html file will look like this :-
The JS file looks like this :-