Implement jQuery Smart wizard

I haven’t used this jQuery library myself, but based on a quick glance on the documentation, you could probably just wrap the wizard inside a <form> tag and add a custom handler for the smartWizard onFinish event. When the event is fired, send the form data to server with either admin ajax or REST API. … Read more

jQuery AJAX url wit variable

try with Axios instead jQuery and check the response, example let form_data = new FormData; form_data.append(‘action’, ‘myAction’); form_data.append(‘first_name’, ‘my first name’); axios.post(myVars.ajax_url, form_data).then(function(response){ console.log(‘response’, response.data); }).cath(console.log)

Slide toggle Jquery UI

As jQuery UI is included in the WordPress Core, you don’t need to load it from the CDN. Please try to change your wp_enqueue_scripts from wp_enqueue_script(‘jquery-ui’, ‘http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js’, ‘1’, true); wp_enqueue_script(‘menu_script’, get_stylesheet_directory_uri() . ‘/js/menu.js’, array(‘jquery’, ‘jquery-ui’), ‘1’, true); to wp_enqueue_script(‘jquery-ui-core’); wp_enqueue_script(‘jquery-effects-slide’); wp_enqueue_script(‘menu_script’, get_stylesheet_directory_uri() . ‘/js/menu.js’, array(‘jquery’, ‘jquery-ui-core’,’jquery-effects-slide’), ‘1’, true); Also be sure to call for the … Read more

Add “onclick” option to header menu item

I went to the GeneratePress site and looked at one of their demos: <nav id=”site-navigation” class=”main-navigation sub-menu-left” itemtype=”https://schema.org/SiteNavigationElement” itemscope> <div class=”inside-navigation”> <button class=”menu-toggle” aria-controls=”primary-menu” aria-expanded=”false”> <span class=”mobile-menu”>Menu</span> </button> <div id=”primary-menu” class=”main-nav”> <ul id=”menu-menu-1″ class=” menu sf-menu”> <li id=”menu-item-594520″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-594520″><a href=”https://generatepress.com/”>area riservata</a></li> <li id=”menu-item-594521″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-594521″><a href=”https://generatepress.com/premium/”>Premium</a></li> </ul> </div> </div><!– … Read more

I want to run Sql Query in script how can i do this

You can use ES6 Promise inside for-each function. So that the loop stop, wait for response from ajax call, than continue loop again with response data. Promises are a clean way to implement async programming in JavaScript (ES6 new feature). Prior to promises, Callbacks were used to implement async programming. Let’s begin by understanding what … Read more