how to add jquery to wordpress

I think I found your problem. In your header.php file you’ve not put wp_head() and also on your footer.php you’ve missed wp_footer(). Where actually the scripts and style get hooked. Please add those wp_head() and wp_footer() to header.php and footer.php respectively. If you’re confused how and where you in those files you need to add … Read more

Unable to remove jquery from header and put in before body ends

jQuery is built into WordPress, so if any other enqueued script relies on it, it’s automatically loaded. To move it to the footer, you have to reregister it, like this: function my_footer_jquery () { wp_deregister_script (‘jquery’); wp_register_script (‘jquery’, includes_url (‘/js/jquery/jquery.js’), array (), NULL, true); wp_enqueue_script (‘jquery’); } add_action (‘wp_enqueue_scripts’, ‘my_footer_jquery’);

AJAX Filter WHILE Loop not working WordPress

I think you should organize your code to return things from Ajax call. If this should work for any user you need to use also wp_ajax_nopriv_… However, I would use dionoh_filter_reports action name. add_action( ‘wp_ajax_dionoh_filter_reports’, ‘filter_reports’ ); add_action( ‘wp_ajax_nopriv_dionoh_filter_reports’, ‘filter_reports’ ); I suggest you check this and learn more.

How do I use slideToggle inside a wordpress post?

Ok, so based on your comments, the problem as those pesky tags… WordPress is nasty with those, sometimes. As I said, it might be worth looking into a plugin that lets you add javascript to specific posts/pages. In the meantime, I suspect things should work if you put your whole javascript tag on one line … Read more

Issues Adding a jQuery Image Slider

Two things to try: Move the enqueue for slick.js above the enqueue for your custom script. Declare Slick as a dependency for your custom script. Change the third parameter to include slickjs: wp_enqueue_script(‘customjs’, get_template_directory_uri() . ‘/js/victoria_theme.js’, array( ‘slickjs’ ), ‘4.7.2’, true);

jQuery UI Tooltip position on dashicon

the simple solution to make your tip follow mouse when hover over certain element like so: $(“.selector”).tooltip({ track: true,//make tip follow mouse when hover over all element with class “selector” content: “Tooltip content here”, });

show a hidden ul if li is active

You can achieve this with a simple JQuery selector. $($(‘.active’).parent(‘ul’).get(0)).css(‘display’, ‘none’); We are selecting the parent UL where we find the active class and hiding the element via css. https://jsfiddle.net/0voxj6fp/

Modify the href attribute of tag dynamically in WordPress

Try this (pure JavaScript): var allBtns = document.getElementsByClassName(‘nectar-button’); function preventDefaultOpenCustomUrl(event) { event.preventDefault(); var price = document.getElementById(“fieldname9_1″).value; var url=”https://na2.docusign.net/member/PowerFormSigning.aspx?PowerFormId=df6fbf3d-6f5d-4c48-8965-f4fa810099f4&Institutional_Buyer_AnnualPrice=” + price; window.open(url); } ; for (i = 0; i < allBtns.length; i++) { allBtns[i].addEventListener(“click”, preventDefaultOpenCustomUrl); } this is adding the event to all buttons with that classname, with Jquery: (function ($) { $(‘.nectar-button’).on(‘click’, function (e) { … Read more