• Hi,

    When a user edits a taxonomy and is presented with a dropdown, I am trying to code a function that looks for a certain value and trigger some other javascript but I cant get the .change function to work.

    Even when I use a type select like:

    $('select').change(function() { alert('onchange'); });

    Any ideas?

    http://wordpress.org/extend/plugins/front-end-editor/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author scribu

    (@scribu)

    That’s because the select element doesn’t exist when you create the binding. It’s created dynamically.

    See http://api.jquery.com/live/

    Thread Starter bleepa

    (@bleepa)

    Considering live is now a deprecated method, I tried to use the .on() method and it that stopped making fields editable i.e. the edit button would not appear.

    jQuery('#status select').on('change', function () { alert('changed'); });

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Front-end Editor] jQuery .change’ is closed to new replies.