On Sun, Nov 8, 2015 at 11:40 PM, Walter Lee Davis <[email protected]> wrote:
> This is all because with Turbolinks, the outermost page loads only once, and 
> never again unless something really disruptive happens to cause a hard reload 
> of the browser. So the usual dom load event only fires once, and any updates 
> to the page don't register with your JavaScript code.

What would the best practice to overcome this problem. Do I use static
file 'chosen.min.css' and 'chosen.jquery.min.js' and put then in
assets/stylesheet and assets/javascript folder respectively or
something else.

Right now I put below code in application.js file

$(function() {
  return $('.chosen-select').chosen({
    allow_single_deselect: true,
    no_results_text: 'No results matched',
    width: '200px'
  });
});

What modification do I need to do I above code so that I runs well.

Please pardon me, my hand is little tight in jQuery :).

-- 
Cheers!

Deepak Kumar Sharma
Guru Nanak Dev Engineering College
India!

Blog: http://deekysharma.wordpress.com

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CALDHwN5FyuPEhK6Yjb_B%3Dnu-ousnb0cjuWQo7Jib_MaF9NEzuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to