New answers tagged

0

There may be browser restrictions preventing autoplaying audio, see this answer https://stackoverflow.com/questions/53058421/local-variable-audio-in-object-method-not-playing You can see this in your browser developer tools console, there will be error like this NotAllowedError: The play method is not allowed by the user agent or the platform in the current ...


0

I finally found some helpful information in this post: How to "Load More" posts via AJAX? The issue ended up being a combination of counting the number of total pages of posts, and sharing that number with the hooked ajax function in functions.php. Here's my page template loop: <div class="events"> <?php $socal_cats = array( '...


0

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)


0

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. So your html could look something like this, <...


0

First, I'm getting confused in the setup here. From the initial posPrintReceipt function, am I attempting to print what's inside the newHTML variable? or something else altogether? Yes, but the WooCommerce code appears to append the newHTML content to the existing page (as observed by the use of window.print();), likely taking advantage of a @media print ...


0

If you're loading this on $( document ).ready() the use of Visual Composer may be resulting in the JS executing too early. Can you try to execute your JS using $( window ).on( 'load', function() );?


0

Found this at https://codex.wordpress.org/AJAX_in_Plugins JavaScript triggering the post-load event after content has been inserted via Ajax: jQuery( document.body ).trigger( 'post-load' ); JavaScript listening to the post-load event: jQuery( document.body ).on( 'post-load', function () { // New content has been added to the page. } ); I ...


0

OK, problem was in WP jquery noConflict. Basically it must work if you replace first $ with jQuery, but in this case needed to replace second $ too. So, answer is to change second $ by jQuery. <textarea class="emojitextarea"></textarea> <script type="text/javascript"> jQuery(document).ready(function() { jQuery(".emojitextarea")....


Top 50 recent answers are included