Blog Post slider not working

What happens if you use .css(“display”,”none”) instead of .style.display = “none”? So that it looks like this: var myIndex = 0; carousel(); function carousel() { var i; var listItem = document.getElementsByClassName(“js–slider-item”); for(i = 0; i < listItem.length; i++) { listItem[i].css(“display”, “none”); } myIndex++; if(myIndex > listItem.length) { myIndex = 1; } listItem[myIndex-1].css(“display”, “block”); setTimeout(carousel, 3000); … Read more

how to send two forms with one click (script ninjaforms id)

I partially stole this answer from SO $(“#idForm”).submit(function(e) { var url = “path/to/your/script.php”; // the script where you handle the form input. $.ajax({ type: “POST”, url: url, data: { form1: $(“#idForm”).serialize(), form2: $(“#idForm2”).serialize() }, // serializes the form’s elements. success: function(data) { alert(data); // show response from the php script. } }); e.preventDefault(); // avoid … Read more

How to make async query in wordpress?

Is any way to make asynchronius query to wordpress, where i can use wordpress functions? Yes, but it’s: super fragile and easy to break a big security problem I strongly advise against it, and would consider the fix needed to make it work irresponsible to share. Instead, save yourself a world of pain and use … Read more

Trying to deque some .js from source

Try using wp_enqueue_scripts with the handle like this example in your functions.php file : add_action( ‘wp_enqueue_scripts’, ‘remove_scripts’, 100 ); function remove_scripts() { wp_dequeue_script( ‘original-handle’ ); wp_deregister_script( ‘original-handle ); } However, this will only work if they have been loaded correctly in using wp_enqueue_scripts. Looks like they have been hard coded in a file which isn’t … Read more

How to submit form data in the same page in WordPress without reloading the page?

Your jQuery event is bound to elements with the class submit, but your submit button in the form doesn’t have that class. Either add that class to the submit button, or just target the form itself. Simply change $(“.button”).click(function() { to $(“#modalForm”).submit(function() { This will fire when the form is submitted, whether the user clicks … Read more