After inserting jquery weather code, my responsive menu is lost

The reason the menu breaks is because the responsive menus are handled with a jQuery plugin. You are wiping out the jQuery object and all the jQuery plugins (which includes the responsive menu) when you include the zweatherfeed Javascript by including a second version of jQuery. The second version overwrites the first version. WordPress has … Read more

inner jQuery won’t work

Try this: jQuery(document).ready(function() { jQuery(‘#showmenu’).click(function() { jQuery(‘.menu’).slideToggle(“fast”); }); }); WordPress hates the $ statement. If you replace it with jQuery, it should work.

Load an action which is in an url with Jquery

$.load() is used to load content into an element. And you need to send a ping/request to a url, don’t need to use what is returned/responded. So, $.post() or $.get() the the solution for this. $.get(”, ‘wpfpaction=add&postid=350’); Usage With the current post id – $.get(”, ‘wpfpaction=add&postid=<?php the_ID(); ?>’); To dynamically add it from functions.php, you … Read more

Execute Jquery when a specific page in my plugin is loading

You’ll need to get the screen id on the screen (or page) in question using get_current_screen() get_current_screen()->id Then, hook into it with the following: function my_script_function() { if ( strpos( get_current_screen()->id, ‘screen_id’ ) !== false ) { wp_enqueue_script( ‘my_javascript_handle’, ‘path/to/my/script.js’, ‘jquery’, ‘1.0’ ); } } add_action( ‘admin_enqueue_scripts’, ‘my_script_function’ ); This will enqueue your script properly … Read more

jQuery code didn’t run on my plugin

Check the DOM for the theboxjs.js and see if it is loaded correctly (check the output path). If not then you have path issues. Try using admin_enqueue_scripts instead of admin_init for loading scripts. You might also have conflict in your script. When writing scripts for WP try to avoid $ and use jQuery instead.

Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]

As @Milo said , WP loads jQuery in no conflict mode so shortcut $ is not available for jQuery to use .You should not use the $ variable for jQuery within WordPress.As you said you are not into jQuery i’m just giving the code below..Try it. jQuery(function ($) { $(window).load(function() { $(‘#main-slider’).flexslider({ animation: “slide”, useCSS: … Read more

Why won’t the Jquery validation plugin work?

You are mixing PHP and Javascript. The part between <script> must not be in the PHP code, but you could put it in the variable just after </form>. Another way of doing it would be to create a Javascript file myfunctions.js, putting the code into it and enqueueing it. The code would be: add_action( ‘wp_enqueue_script’, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)