how to make this work with jquery 1.12.4 [closed]

If you only have one iframe, just set the iframe’s src attribute in the .show() callback function. <script type=”text/javascript”>//<![CDATA[ jQuery(window).load(function($){ setTimeout(function(){ $(‘.hidden_div’).show(function(){ $(this).find(‘iframe’).attr(‘src’, ‘https://example.com/’); }); }, 5000); });//]]> </script> If you need more dynamic code, remove the src attribute of the iframe, and add a new attribute with the url like so <iframe data-src=”https://example.com/”></iframe> And … Read more

How to Javascript/jQuery

Just paste this in your functions.php file. It will automatically add jQuery in your theme. function wcs_scripts_styles() { wp_enqueue_script( ‘jquery’ ); } add_action( ‘wp_enqueue_scripts’, ‘wcs_scripts_styles’ ); WordPress automatically include jquery from it’s location. You do not need to upload jquery on your theme. additionally you can also add more scripts lile this. function wcs_scripts_styles() { … Read more

Widget won’t work due to old JavaScript? Any ideas how to make it work? [closed]

From your site i can say that script is not being loaded because of wrong opening quote for script tag.Use ” instead of ” So <script src=”http://lookbook.nu/widget/profile.js?id=2303472&width=standard&align=left&stats_fans=1&fanbox=yes&hash=14575a9cd02fd36d2758e5db3cb92b5a”></script> Should be this <script src=”http://lookbook.nu/widget/profile.js?id=2303472&width=standard&align=left&stats_fans=1&fanbox=yes&hash=14575a9cd02fd36d2758e5db3cb92b5a”></script> Update: Add <script> $LB = jQuery; </script> before the other script tag. I mean before <script src=”http://lookbook.nu/widget/profile.js?id=2303472&width=standard&align=left&stats_fans=1&fanbox=yes&hash=14575a9cd02fd36d2758e5db3cb92b5a”></script>

jQuery conflict

Based on your Edit 3: In response to Chip Bennett here is the call found in functions.php of my theme. wp_deregister_script(‘jquery’); wp_enqueue_script(‘jquery’); I see two issues: You need to put your enqueue inside a callback, hooked into wp_enqueue_scripts (for the frontend) or admin_enqueue_scripts (for the admin back-end), like so: <?php function wpse45377_enqueue_scripts() { wp_deregister_script(‘jquery’); wp_enqueue_script(‘jquery’); … Read more

Why is jQuery not working properly? [closed]

Upon first glance, both cycle.js and your javascript code need to be in the page AFTER jQuery is included. Right now, they are before so they both generate errors that jQuery is not defined. Make sure that jQuery is included first before you try to use jQuery. In the future, I would also strongly suggest … Read more

How to Add jQuery cod in wordpress [duplicate]

use this: var j = jQuery.noConflict(); now everywhere in script JQurey is needed use j instead of $ or JQuery also your enqueue line should be like this: wp_register_script(‘myjs’,get_stylesheet_directory_uri().’/js/my_script.js’,array(‘jquery’),false,true); wp_enqueue_script(‘myjs’); you can read more here P.S: so your updated code should be : mycustom.js var j = jQuery.noConflict();//this line Must be first line of script … Read more