Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
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?
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’)
Hi Oscar
Thanks for sharing your fix, glad to hear you got it resolved.
All the best.