On Sun, Nov 8, 2015 at 11:40 PM, Walter Lee Davis <
wa...@wdstudio.com> 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 :).