jquery - Simple Javascript Joyride plugin in rails -


i'm afraid plugin isn't working because of misunderstanding of rails. i'm adding zurbs joyride plugin index page.

i have following in vendor/assets/javascripts/joyride -

joyride-2.0.3.js jquery.cookie.js modernizr.mq.js 

and referencing them following way in application.js -

//= require jquery //= require jquery-ui //= require jquery_ujs //= require joyride/joyride-2.0.3 //= require joyride/modernizr.mq.js //= require joyride/jquery.cookie //= require_tree . 

and appropriate css in vendor/assets/stylesheets -

joyride-2.0.3.css 

and referenced in application.css -

 *= require_self  *= require bootstrap  *= require joyride-2.0.3 

now in index view-

<h1 id="pagetitle">title of page</h1>  <ol id="list_index_tour">  <li data-id="pagetitle">here title of page goes!</li> </ol>  <script>   $(window).load(function() {     $("#list_index_tour").joyride({     });   }); </script> 

the tour not initiated, instead have ordered list displayed. there application layout. missing here?

you try make manifest file plugin. create index.js inside subfolder , reference assets.

in application.js can have just:

//= require joyride

you can try drop .js part in //= require joyride/modernizr.mq.js


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -