I’m trying to call a JS function defined in
remote: true controller response, like
Or is this a bad idea and I should be doing this another way?
I’m using Isotope in my Rails app, defined in
When an item is updated on the page that triggers a
remote: true request I’d like to be able to call the
$grid variable from the
# views/items/updat.js.erb # update the item then call $grid.isotope();
From what I understand, the JS compiled in the manifest file is wrapped in a function to prevent polluting the global namespace.
I’m not really into the idea of making things global just to overcome this problem so what should I look at?