Chardinjs not working in ruby โ€‹โ€‹on rails

Hi i am trying chardin js site for my project. But some of them don't work. I am working on rails 3.2.14 and ruby โ€‹โ€‹1.9.3 and chardin js version is 0.1.3, so please help me. Here I am attaching the fiddle link.

Edit: The same was done in my project (in terms of). but when I clicked on the "See" link, no action image appears.


$('a[data-toggle="chardinjs"]').on 'click', (e) ->
    if $('.jumbotron img').is(':visible')
        $('.jumbotron img').animate height: 250, 600, ->

$('body').on 'chardinJs:stop', ->
    $('a.btn.primary').off('click').text('See more on Github')
        .attr('href', '')
    $('a#opentour').css display: 'block'


css is the same as in fiddle

home / show.html.erb

  <div class="container">
  <div class="jumbotron">
  <h1 data-intro="Project title" data-position="right">Chardin.js</h1>
  <p class="lead">
  Simple overlay instructions for your apps.
  <img src="" data-intro="An awesome 18th-     century painter, who found beauty in everyday, common things." data-position="right" />
  <a id="asdfg" href="#" class="btn btn-large primary" data-toggle="chardinjs" data-intro="This button toggles the overlay, you can click it, even when the overlay is visible" data-position="left">See it in action</a>
  <a href="" id="opentour" class="hide" data-toggle="chardinjs">Or open it again</a>
  <div class="credits">
  <p data-intro="Author of this plugin, aka Pablo Fernandez" data-position="right">
    Baked with
    <a href="">@heelhook</a>.
  <div class="links">
  <p id="links" data-intro="Links to Github, Twitter, etc." data-position="top">



//= require jquery
//= require jquery_ujs
//= require chardinjs.min
//= require_tree .



source to share

2 answers

I feel like your problem might be the same as your gist: you think github is a CDN, but it isn't.

For js use

For css use



Actually by mistake I put both files ( chardinjs.js and chardinjs.min.js

) in assets/javascript

. And in the application.js

require_tree file all js tree files are loaded. so this was the problem and also changed document.ready

in the file




All Articles