This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

JavaScript on widget not working on page builder

Resolved 2 replies pluginplugin-page-builder
11 years ago · Last reply by Andrew Misplon 11 years ago

Hi, I build a widget for my theme that includes a dropdown and several checkboxes. When the value in the dropdown changes, it checks and unchecks some boxes depending on some default values for that option. This change is made on the fly with jQuery.

It works fine if I add the widget to a regular sidebar in the widgets page, but when I add it to a page using the page builder, the checkboxes don’t change. Are there any particular requirement to get js to work in the widgets with the page builder?

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

2
  1. Oscar Alcalá 11 years, 8 months ago

    Nevermind, figured it out. In case anyone has the same issue:

    I had my selector in jQuery set to:

    $( ‘#widgets-right select.select_style’)

    which is required or everything to work correctly in the the widgets admin area, just add a selector without the #widgets-right part:

    $( ‘#widgets-right select.select_style, select.select_style’)

  2. Andrew Misplon Staff 11 years, 8 months ago

    Hi Oscar

    Thanks for sharing your fix, glad to hear you got it resolved.

    All the best.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread