Hello to all! I have a problem. I created a widget, added inputs and selections. In the first selection, I get the site from the multisite, then save it, and I’ve next. Select a category from this site, select a category, then save again, and next. select posts from category. Everything is loaded only after the save button, respectively. I scribbled a script on js, which would immediately pull out all the needlessly save buttons to change, so that I could immediately see the changes. It works, saves with the necessary data, but as soon as I press save, then everything, the script no longer works, as if my js becomes inaccessible, why is this happening, who knows the answer?

$( '#widget-glenbrook_sites_widget1-2-site' ).on( 'change', function() { $( '#widget-glenbrook_sites_widget1-2-savewidget' ).click(); } ); $( '#widget-glenbrook_sites_widget1-2-category' ).on( 'change', function() { $( '#widget-glenbrook_sites_widget1-2-savewidget' ).click(); } ); 

https://codepen.io/anon/pen/oZJBPX - here all the code with PHP

  • PHP stuffing in the codepen makes no sense, especially since it has nothing to do with it. I need them generated html and js. - KAGG Design
  • What handlers hang on save? - KAGG Design

0