How to re-bind jQuery listening events in the widget dashboard?
I’m using jQuery for my widget options setup (in the dashboard under the Widgets section). While in the widgets dashboard I can add multiple widgets to the sidebar, but widget’s settings don’t work until I actually click on the “Save Changes” button. My guess is that when widget is being added to the sidebar, I need to re-bind it with the current listening events, so they are aware of the newly loaded elements. For example, I can add first widget and save it – then I can actually change its settings to whatever I need (jQuery works fine); then I add another widget but settings don’t work until I save it.
I’m really new to jQuery and not really sure I understand this particular case correctly. I was trying to re-bind the newly added widget on click event for the “add” widget action, but that didn’t work.
I would appreciate for any suggestions on how to solve this issue, or any other best jQuery practices for the widget backend settings.
- The topic ‘How to re-bind jQuery listening events in the widget dashboard?’ is closed to new replies.