Cheers! I am trying to implement popup window with Lightbox_me plugin in my Ruby On Rails application. I have downloaded jquery.lightbox_me.js, put it to app/assets/javascripts,
add //= require jquery.lightbox_me in application.js file, and in home.js.coffee (I’ve HomeController) I do stuff like this:
`$(".popup-button").click (e) ->
alert "!!!"
$(".download_layout").lightbox_me centered: true
e.preventDefault()
alert shows normally, but .lightbox_me doesn’t work. Whats the problem?
EDIT:
application.js
//.......
//= require jquery
//= require jquery_ujs
//= require jquery.lightbox_me
//= require bootstrap
//= require_tree .
Try to stick to the CoffeeScript syntax :
EDIT : Don’t forget to place this very important string on the top of your
.js.coffee(I have replicated your code on my machine and it works) :