用于使用 Rails 3.1 进行幻灯片放映的 Zurb Orbit 插件
我正在尝试使用 Zurb Orbit 插件在我的 Rails 应用程序中进行幻灯片放映。
我有一个家庭控制器,其中有索引功能。
这是我的代码:
-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"%>
我已分别将 js 文件和 css 文件包含在 app/assets 文件夹中
但似乎幻灯片无法正常工作。这是一个非常简单的东西,我不知道为什么我无法在页面上获取幻灯片。
正在加载 JavaScript 文件。可能是什么问题?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
html 文件将如下所示:-
JS 文件将如下所示:-
The html file will look like this :-
The JS file looks like this :-