2

So I have the following:

Does not work

$(document).on('click','#memberships_save', function(){

Does work

$('#memberships_save').click(function() {

The element is not dynamically created. The on method works in other triggers on the page, just not for this specific ID. The ID exists only once in the HTML.

enter image description here

Any ideas?

pee2pee
  • 3,619
  • 7
  • 52
  • 133

1 Answers1

0

Both methods work for me: CodePen

Could it be that disabled=true prevents the first method from working? You could use a class to mimic the appearance of a disabled button instead.

Lundstromski
  • 1,197
  • 2
  • 8
  • 17