WordPress.org

Ready to get started?Download WordPress

Forums

How to re-bind jQuery listening events in the widget dashboard? (3 posts)

  1. Max Chirkov
    Member
    Posted 5 years ago #

    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.

    Thank you.

  2. Max Chirkov
    Member
    Posted 5 years ago #

    Am I the only who is trying to use jQuery in the widget's administrative dashboard? Bumping this up.

  3. crille
    Member
    Posted 4 years ago #

    Perhaps too late, but you can use the JQuery live-Methode.

Topic Closed

This topic has been closed to new replies.

About this Topic