jQuery on Widget Admin Form Fields
-
Hello,
very fresh to WP – I m creating a custom widget.
My goal is to have the widget display chained select lists in the admin.
Select for choosing menu, select 2 will display menu items of that menu.But I am not able to make any jQuery work for the fields.
I have added my js file, it loads fine and it actually runs any code that is not for the fields, e.g. :jQuery(document).ready(function(){ alert('ok');
will work…
But :
jQuery('#myelement').click(function(){ alert('Clicked'); })
for an element inside the form like :
<p id='myelement'>
it won’t.There are no js errors in the console.
I have looked everywhere, but found nothing so far… a few similar questions in forums etc do not have answers.What am I missing here? Any advises are much appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘jQuery on Widget Admin Form Fields’ is closed to new replies.