我有一個模板,我已經安裝了,除了一些javascript之外,一切都正常工作,但是當我檢查javascript的編譯列表時,我看到所有文件都已加載,並且CSS具有所有正確的文件。排除故障並找出如何讓js加載並確定問題的最佳方法是什麼?插件不能在rails上工作4
這裏是我的application.js文件
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require jquery.purr
//= require best_in_place
//= require bootstrap
//= require turbolinks
//= require js/template
//= require bootstrap/js/bootstrap
//= require plugins/rs-plugin/js/jquery.themepunch.revolution
//= require plugins/rs-plugin/js/jquery.themepunch.enablelog
//= require plugins/isotope/isotope.pkgd
//= require magnific-popup
//= require plugins/SmoothScroll
//= require plugins/modernizr
//= require plugins/jquery.validate
//= require plugins/jquery.parallax-1.1.3
//= require plugins/jquery.min
//= require plugins/jquery.knob.min
//= require plugins/jquery.countTo
//= require plugins/jquery.browser
//= require owl.carousel
//= require js/custom
//= require js/coming.soon.config
//= require js/google.map.config
//= require bootstrap/js/bootstrap.min
//= require bootstrap/js/npm
//= require plugins/bootstrap-notify/bootstrap-notify.min
//= require_tree ../../../vendor/assets/template/bootstrap/js
//= require_tree ../../../vendor/assets/template/js
//= require_tree ../../../vendor/assets/template/plugins/bootstrap-notify
//= require_tree ../../../vendor/assets/template/plugins/charts
//= require_tree ../../../vendor/assets/template/plugins/jasny-bootstrap/js
//= require_tree ../../../vendor/assets/template/plugins/jquery.countdown
//= require_tree ../../../vendor/assets/template/plugins/morphext
//= require_tree ../../../vendor/assets/template/plugins/vide
//= require_tree ../../../vendor/assets/template/plugins
而且,這裏是我的application.css.scss文件
@import "bootstrap";
@import "css/style";
@import "plugins/rs-plugin/css/settings-ie8";
@import "css/animate";
@import "plugins/rs-plugin/css/settings";
@import "css/animations";
@import "font-awesome";
@import "fontello";
@import "plugins/morphext/morphext";
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require magnific-popup
*= require owl.carousel
*= require owl.theme
*= require owl.transitions
*= require_directory ./plugins/hover
*= require animate
*= require jquery.countdown
*= require 'bootstrap/css/bootstrap.css'
*= require '/fonts/font-awesome/font-awesome.scss'
*= require_directory ./fonts/fontello/css
*= require_directory ./plugins/jasny-bootstrap/css
*= require_directory ./plugins/morphext
*= require_directory ./css/skins
*= require_directory ./css
*= require hover
*/
頁是假設這個樣子http://htmlcoder.me/preview/the_project/v.1.1/template/features-sliders-video-background.html#
但滾動視頻不會工作或在框中淡入。不知道該先做什麼。
這裏是控制檯顯示
處理的渲染WelcomeController#指數HTML 歡迎/ __ manager_slideshow.html.erb(0.1毫秒)內呈現的佈局/應用 歡迎/ index.html.erb( 14.5ms)在4392ms(查看已完成 200 OK:4391.3ms)
開始使用,即可爲10.0.2.2 「/assets/jquery.js?body=1」 在二零一五年十二月十日 五點44分二十秒+ 0000
St arted GET「/assets/jquery_ujs.?body=1」for 10.0.2.2 at 2015-12-10 05:44:20 +0000
Started GET「/assets/application.css?body=1」爲10.0.2.2,在 2015年12月10日5時44分20秒+0000
開始使用,即可爲10.0.2.2 「/assets/jquery.purr.js?body=1」 在2015年12月10日 05 :44:21 0000
發起者GET爲10.0.2.2 「/assets/best_in_place.js?body=1」 在2015年12月10日 5點44分21秒0000
發起者GET「/資產/ jquery.autosize.js?體= 1" 10.0.2.2在 2015年12月10日5點44分21秒0000
發起者GET 「爲10.0.2.2 /assets/bootstrap/affix.js?body=1」 在 2015 - 12-10 5時44分22秒+0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/alert.js?body=1」 在 2015年12月10日5時44分22秒+0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/button.js?body=1」 在 2015年12月10日5點44分22秒+0000
入門使用「/資產/引導/崩潰。對於10.0.2.2,js?body = 1「在 2015年12月10日5時44分22秒+0000
開始使用,即可爲10.0.2.2「/assets/bootstrap/carousel.js?body=1」在 2015年12月10日5時44分22秒+0000
對於10.0.2,開始GET「/assets/animate.css」。2 at 2015-12-10 05:44:23 +0000
開始獲取10.0.2.2的「/assets/bootstrap/dropdown.js?body=1」在 2015-12-10 05:44: 23 +0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/tab.js?body=1」 在 2015年12月10日5點44分23秒+0000
入門使用「/資產/bootstrap/transition.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:23 +0000
Started GET」/assets/bootstrap/scrollspy.js?body=1「for 10.0.2.2在 2015年12月10日5點44分23秒+0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/modal.js?body=1」 在 2015年12月10日5點44分23秒+ 0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/tooltip.js?body=1」 在 2015年12月10日5時44分24秒+0000
入門使用「/資產/引導/popover.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:24 +0000
10.0.2.2開始GET」/assets/bootstrap.js?body=1「at 2015-12-10 5時44分24秒+0000
開始使用,即可爲10.0.2.2 「/assets/turbolinks.js?body=1」 在二○一五年十二月一十日 5時44分24秒+0000
開始GET 「/assets/revolution-slider/jquery.themepunch.enablelog.js?body=1」 爲 10.0.2.2在2015年12月10日5時44分25秒+0000
入門掌握 「/資產/ revolution-slider/jquery.themepunch.revolution.js?body = 1「for 10.0.2.2於2015-12-10 05:44:25 +0000
Sta在二○一五年十二月十日5時44分25秒+0000
入門GET「rted GET 」/assets/revolution-slider/jquery.themepunch.revolution.min.js?body=1「 爲10.0.2.2 /assets/revolution-slider/index.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:25 +0000
Started GET」/assets/isotope/isotope.pkgd.js ?body = 1「for 10.0.2.2 at 2015-12-10 05:44:26 +0000
2015.2.0開始GET」/assets/magnific-popup.js?body=1「在 2015年-12-10 05:44:26 +0000
開始GET 「/assets/SmoothScroll.js?body=1」 爲10.0.2.2,在 2015年12月10日5時44分26秒+0000
開始GET「/assets/modernizr.js?body= 1「for 10.0.2.2 at 2015-12-10 05:44:27 +0000
已啓動GET」/assets/jquery.validate.js?body=1「for 10.0.2.2 at 2015-12- 10 05:44:27 +0000
10.0.2開始GET「/assets/jquery.parallax-1.1.3.js?body=1」。2 at 2015-12-10 05:44:27 +0000
10.0.2.2在2015-12-10發起GET「/assets/jquery.min.js?body=1」 05:44: 28 +0000
開始使用,即可爲10.0.2.2 「/assets/jquery.knob.min.js?body=1」 在 二○一五年十二月一十日5點44分28秒+0000
入門GET「 /assets/jquery.countTo.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:28 +0000
Started GET」/assets/jquery.browser.js?body=1 「對於10.0.2.2在 2015-12-10 05:44:28 +0000
已啓動GET「/assets/owl.carousel.js?body=1」for 10.0.2.2 at 2015-12-10 05:44:29 + 0000
開始使用,即可爲10.0.2.2 「/assets/custom.js?body=1」 在2015年12月10日 5時44分29秒+0000
開始GET「/assets/coming.soon .config.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:29 +0000
已啓動GET」/assets/google.map.config.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:29 +0000
開始使用,即可爲10.0.2.2 「/assets/js/bootstrap.min.js?body=1」 在 2015年12月10日五點44分29秒+0000
入門使用「/資產/ js/npm.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:30 +0000
Started GET」/assets/bootstrap-notify/bootstrap-notify.min.js?體= 1" 爲10.0.2.2在2015年12月10日5時44分30秒0000
發起者GET 「/assets/js/bootstrap.js?body=1」 爲10.0.2.2在 2015 - 12-10 05:44:30 +0000
開始使用,即可爲10.0.2.2 「/assets/template.js?body=1」 在2015年12月10日 五點44分30秒+0000
入門使用「/資產/引導,通知/ bootstrap-notify.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:31 +0000
開始GET」/assets/charts/Chart.js?body=1「爲10.0 .2.2 at 2015-12-10 05:44:31 +0000
已啓動GET「/assets/charts/Chart.min.js?body=1」for 10.0.2.2 at 2015-12-10 05 :44:31 +0000
入門GET 「/assets/isotope/isotope.pkgd.min.js?body=1」 爲10.0.2.2 在二零一五年十二月十日五點44分31秒+0000
入門使用「/ assets/jasny-bootstrap/js/jasny-bootstrap.js?body = 1「爲 10.0.2.2於2015-12-10 05:44:31 +0000
開始GET」/ assets/jasny-bootstrap/js/jasny-bootstrap.min.js?body = 1「 for 10.0.2.2 at 2015-12-10 05:44:32 +0000
Started GET」/assets/jquery.countdown/jquery.countdown。 js?body = 1「爲 10.0.2。2 at 2015-12-10 05:44:32 +0000
已啓動GET「/assets/jquery.countdown/jquery.countdown.min.js?body=1」 for 10.0.2.2 at 2015-12- 10 05:44:33 +0000
開始GET「/assets/jquery.countdown/jquery.plugin.js?body=1」爲 10.0.2.2於2015-12-10 05:44:33 +0000
入門GET 「/assets/jquery.countdown/jquery.plugin.min.js?body=1」 爲 10.0.2.2在二零一五年十二月一十日5時44分33秒+0000
開始GET 「/assets/magnific-popup/jquery.magnific-popup.j S'=體1" 10.0.2.2 在2015年12月10日5時44分33秒0000
發起者GET 「/assets/magnific-popup/jquery.magnific-popup.min.js?body = 1" 10.0.2.2在二○一五年十二月一十日5時44分33秒0000
發起者GET 「/assets/morphext/morphext.js?body=1」 爲10.0.2.2在 2015-12 -10 05:44:34 +0000
已啓動GET「/assets/morphext/morphext.min.js?body=1」for 10.0.2.2 at 2015-12-10 05:44:34 +0000
開始GET「/assets/owl-carousel/owl.carousel.js?body=1」爲10.0.2.2 於2015-12-10 05:44:34 +0000
開始GET「/ assets/owl -carousel/owl.carousel.min.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:34 +0000
Started GET」/assets/pace/pace.min.js ?體= 1" 10.0.2.2在 2015年12月10日5時44分34秒0000
發起者GET 「/assets/rs-plugin/js/jquery.themepunch.enablelog.js?body= 1「爲 10.0.2.2於2015-12-10 05:44:34 +0000
在2015年12月10日5時44分35秒+0000
入門掌握 「/assets/rs-plugin/js/jquery.themepunch.revolution.js?body=1」 爲 10.0.2.2啓動GET 「/assets/rs-plugin/js/jquery.themepunch.revolution.min.js?body=1」 爲 10.0.2.2在二零一五年十二月十日5時44分35秒+0000
開始GET 「/assets/vide/jquery.vide.js?body=1」for 10.0.2.2 at 2015-12-10 05:44:35 +0000
Started GET「/assets/vide/jquery.vide。 min.js?body = 1「爲10.0.2.2,在 2015-12-10 05:44:35 +0000
開始GET「/assets/waypoints/jquery.waypoints.js?body=1」爲 10.0.2.2於2015-12-10 05:44: 35 +0000
入門GET 「/assets/waypoints/jquery.waypoints.min.js?body=1」 爲 10.0.2.2在2015年12月10日5時44分36秒+0000
入門GET「/assets/application.js?body=1」for 10.0.2.2 at 2015-12-10 05:44:36 +0000
Started GET「/assets/rails.validations.js?body=1 「爲10.0.2。2 at 2015-12-10 05:44:36 +0000
已啓動GET「/assets/jquery_ujs.?body=1」for 10.0.2.2於2015-12-10 05:44:37 + 0000
開始使用,即可爲10.0.2.2 「/assets/jquery.purr.js?body=1」 在2015年12月10日 5點44分37秒+0000
入門使用「/資產/ jQuery的.autosize.js?體= 1" 10.0.2.2在 二○一五年十二月一十日5點44分37秒0000
發起者GET 「在/assets/best_in_place.js?body=1」 爲10.0.2.2 2015-12-10 05:44:37 +0000
10.0.2.2開始GET「/assets/bootstrap/affix.js?body=1」在 2015-12-10 05:44:37 + 0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/alert.js?body=1」 在 二○一五年十二月一十日5時44分37秒+0000
入門使用「/資產/引導/button.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:38 +0000
已啓動GET」/assets/bootstrap/carousel.js?body=1「爲10.0。 2.2 at 2015-12-10 05:44:3 8 +0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/collapse.js?body=1」 在 2015年12月10日5時44分38秒+0000
入門使用「/資產/bootstrap/dropdown.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:38 +0000
Started GET」/assets/bootstrap/tab.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:38 +0000
對於10.0.2.2開始GET「/assets/bootstrap/transition.js?body=1」在 2015-12-10 05: 44:38 +0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap/scrollspy.js?body=1」 在 2015年12月10日5點44分39秒+0000
入門使用「/資產/引導/ modal.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:39 +0000
對於10.0.2.2開始GET」/assets/bootstrap/tooltip.js?body=1「 at 2015-12-10 05:44:39 +0000
已啓動GET「/assets/bootstrap/popover.js?body=1」for 10.0.2.2 at 2015-12-10 05:44:39 +0000
開始使用,即可爲10.0.2.2 「/assets/bootstrap.js?body=1」 在2015年12月10日 5點44分39秒+0000
入門GET「/assets/turbolinks.js?體= 1" 10.0.2.2在2015年12月10日 5點44分40秒0000
發起者GET 「/assets/revolution-slider/jquery.themepunch.enablelog.js?body=1」 爲 10.0.2.2 at 2015-12-10 05:44:40 +0000
Started GET 「/assets/revolution-slider/jquery.themepunch.revolution.js?體= 1" 10.0.2.2在2015年12月10日5點44分40秒0000
發起者GET 「/assets/revolution-slider/jquery.themepunch.revolution.min.js?body=1 「 爲10.0.2.2,在2015年12月10日五點44分40秒+0000
入門GET 」/assets/revolution-slider/index.js?body=1「 爲10.0.2.2 在2015-12 -10 5時44分41秒+0000
開始使用,即可爲10.0.2.2 「/assets/isotope/isotope.pkgd.js?body=1」 在 2015年12月10日5時44分41秒+0000
已啓動GET「/assets/magnific-popup.js?body=1」for 10.0.2.2 at 2015-12-10 05:44:41 +0000
Started GET「/assets/SmoothScroll.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:41 +0000
開始GET」/assets/modernizr.js?body=1「for 10.0.2.2於2015-12-10 5時44分41秒+0000
開始使用,即可爲10.0.2.2 「/assets/jquery.validate.js?body=1」 在 2015年12月10日5點44分42秒+0000
入門GET「/ asse ts/jquery.parallax-1.1.3.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:42 +0000
Started GET」/assets/jquery.min.js?身體= 1「爲10.0.2.2在2015-12-10 05:44:42 +0000
開始GET」/assets/jquery.knob.min.js?body=1「爲10.0.2.2在 2015-12-10 05:44:42 +0000
已啓動GET「/assets/jquery.countTo.js?body=1」for 10.0.2.2 at 2015-12-10 05:44:42 +0000
Started GET「/assets/jquery.browser.js?bod Y = 1" 10.0.2.2在 2015年12月10日5時44分43秒0000
發起者GET 「/assets/owl.carousel.js?body=1」 爲10.0.2.2在 2015 - 12-10 5時44分43秒+0000
開始使用,即可爲10.0.2.2 「/assets/custom.js?body=1」 在二○一五年十二月十日 5時44分43秒+0000
開始使用,即可爲10.0.2.2 「/assets/coming.soon.config.js?body=1」 在 2015年12月10日5點44分43秒+0000
開始GET「/assets/google.map。 config.js?body = 1「爲10.0.2.2在 2015-12-10 05:44:43 +0000
已啓動GET「/assets/js/bootstrap.min.js?body=1」for 10.0.2.2 at 2015-12-10 05:44: 43 0000
發起者GET爲10.0.2.2 「/assets/js/npm.js?body=1」 在2015年12月10日 5時44分44秒0000
發起者GET「/資產/bootstrap-notify/bootstrap-notify.min.js?body=1" 爲10.0.2.2,在2015年12月10日5時44分44秒+0000
入門GET「/assets/js/bootstrap.js對於10.0.2,「body = 1」。2在2015年12月10日 5點44分44秒0000
發起者GET爲10.0.2.2 「/assets/template.js?body=1」 在2015年12月10日 5點44分44秒+ 0000
入門GET 「/assets/bootstrap-notify/bootstrap-notify.js?body=1」 爲 10.0.2.2在2015年12月10日5時44分44秒+0000
入門GET「 /assets/charts/Chart.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:45 +0000
Started GET」/assets/charts/Chart.min.js?body = 1「10.0.2.2在 2015-12-10 05:44:45 +0000
開始GET「/assets/isotope/isotope.pkgd.min.js?body=1」爲10.0.2.2 於2015-12-10 05: 44:45 +0000
入門GET 「/assets/jasny-bootstrap/js/jasny-bootstrap.js?body=1」 爲 10.0.2.2在2015年12月10日5點44分45秒+0000
入門GET 「/assets/jasny-bootstrap/js/jasny-bootstrap.min.js?body=1」 爲10.0.2.2,在2015年12月10日5時44分45秒+0000
入門GET「/assets/jquery.countdown/jquery.co 10.0.2.2 at 2015-12-10 05:44:46 +0000
Started GET「/assets/jquery.countdown/jquery.countdown.min.js?body=」 1" 爲10.0.2.2,在2015年12月10日5時44分46秒+0000
入門GET 「/assets/jquery.countdown/jquery.plugin.js?body=1」 爲 10.0.2.2在2015-12-10 05:44:46 +0000
開始GET「/assets/jquery.countdown/jquery.plugin.min.js?body=1」爲 10.0.2.2於2015-12-10 05 :44:46 +0000
開始GET 「/assets/magnific-popup/jquery.magnific-popup.js?body=1」 爲10.0.2.2在2015年12月10日5點44分46秒0000
發起者GET 「/ assets/magnific-popup/jquery.magnific-popup.min.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:46 +0000
Started GET」/ assets/morphext/morphext.js?體= 1" 10.0.2.2在 2015年12月10日5時44分47秒0000
發起者GET 「/assets/morphext/morphext.min.js?body=1」 10.0 .2.2 at 2015-12-10 05:44:47 +0000
入門GET 「/assets/owl-carousel/owl.carousel.js?body=1」 爲10.0.2.2 在2015年12月10日5時44分47秒+0000
入門使用「/資產/owl-carousel/owl.carousel.min.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:47 +0000
Started GET」/assets/pace/pace.min的.js?體= 1" 10.0.2.2在 二○一五年十二月一十日5點44分47秒0000
發起者GET 「/assets/rs-plugin/js/jquery.themepunch.enablelog.js?身體= 1「爲 10.0.2。2,在2015年12月10日五時44分47秒+0000
入門掌握 「/assets/rs-plugin/js/jquery.themepunch.revolution.js?body=1」 爲 10.0.2.2在2015年-12-10 5時44分48秒+0000
入門掌握 「/assets/rs-plugin/js/jquery.themepunch.revolution.min.js?body=1」 爲 10.0.2.2在2015 - 12-10 05:44:48 +0000
對於10.0.2.2開始GET「/assets/vide/jquery.vide.js?body=1」在 2015-12-10 05:44:48 +0000
入門掌握了10.0.2.2 「/assets/vide/jquery.vide.min.js?body=1」 在 2015年12月10日5時44分48秒+0000
入門使用「/資產/航點/jquery.waypoints.js?body=1「for 10.0.2.2 at 2015-12-10 05:44:48 +0000
Started GET」/assets/waypoints/jquery.waypoints.min.js?body = 1「for 10.0.2.2 at 2015-12-10 05:44:49 +0000
已啓動GET」/assets/application.js?body=1「for 10.0.2.2於2015-12-10 05:44:49 +0000
開始使用,即可爲10.0.2.2 「/assets/rails.validations.js?body=1」 在 2015年12月10日5點44分49秒+0000
入門GET「/assets/fontawesome-webfont.woff2 ?v = 4.5.0" 爲10.0.2.2 在2015年12月10日5時44分49秒+0000
所以從我所看到的一切都裝載有沒有錯誤。我也注意到,有一類是有一些JavaScript運行如
<div class="pv-30 ph-20 feature-box bordered shadow text-center object-non-visible" data-animation-effect="fadeInLeftSmall" data-effect-delay="100">
任何物體不會因爲「對象不可見」它永遠不會變得可見裝載這使我進一步認爲,一些JS沒有加載或好好工作。
在我改變javascript之前,我按照你的建議去掉了turbolinks,沒有改變,所以我不認爲是這樣。在turbolinks後仍然沒有顯示滑塊被刪除 – SupremeA
嗯,在這種情況下,我不完全確定。你是否已經嘗試在代碼塊中插入一個'debugger'語句來判斷它是否被執行? –
它的一個滑塊,所以我把一個調試器只是在代碼中,沒有任何顯示與以前相同,這再次導致我的JavaScript問題。 – SupremeA