Issue
I have a task to generate option using ajax in visual composer element, but when I try to select the element and attach an event using jQuery.. I can't trigger the event. Below is the jQuery script that I used to select the visual composer element.
jQuery('.post_id').on('change', function(){ console.log('Changed'); });
OR
jQuery(document).on('change', '.post-id', function(){ console.log('Change'); })
This is the screenshot of the visual composer element that I want to select using jQuery.
Thanks.
Solution
replace '.post_id' to '[name=post_id]'
Answered By - diavolic Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.