I'm trying to figure out how to run some jquery after you click trash can icon to delete a row in grid. I have ajax code I have to run if you delete a row. EE has code in there that probably has preventDefault() which is stopping my code from triggering.

This is inside a channel form field on frontend. I can't seem to bind anything to that delete row icon

  • preventDefault() wouldn't stop a trigger hook on click created using jQuery.
    – jrothafer
    Oct 6, 2017 at 16:55

1 Answer 1


I ended up finding a solution... I changed the selector and that seemed to do the trick. For some reason the selector I was using had too much binded but this new selector worked. I also changed $('body') to $(document) and that worked.

final code that worked was

$(document).on('click', 'ul.toolbar li.remove a', function(){

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.