bernat / best_in_place

A RESTful unobtrusive jQuery Inplace-Editor and a helper as a Rails Gem
http://blog.bernatfarrero.com/in-place-editing-with-javascript-jquery-and-rails-3/
1.2k stars 574 forks source link

classes parameter not being picked up by js #565

Open Carpela opened 7 years ago

Carpela commented 7 years ago

Am using the recommended:

= best_in_place @user, :name, :classes => 'highlight_on_success'

But I'm not getting any response from it with

$('.highlight_on_success').bind("ajax:success", function(){$(this).closest('tr').effect('highlight');}); 

If I use straight

$('.best_in_place').bind("ajax:success", function(){$(this).closest('tr').effect('highlight');});

This works, but I can't tie it to a specific best_in_place field (I have multiple on the page).

It also doesn't show up in the css, the only class related to the best inplace object in the html is the .best_in_place one.