mercredi 13 juillet 2016

Uncaught TypeError is not a function on AJAX callback


In my application.js file, I have the following: $(document).ready(function() { /* Activating Best In Place */ jQuery(".best_in_place").best_in_place(); $('.highlight_on_success').bind("ajax:success", function(){$(this).closest('div.social-comment').effect('highlight');}); }); I am using the Best In Place gem, and it gives me the above function to use in my best_in_place call. However, when I use it, I get this error in my JS console: Uncaught TypeError: $(...).closest(...).effect is not a function application.self-440dd817e40548768e9.js:25 How do I fix this and get it work?

Aucun commentaire:

Enregistrer un commentaire