Having problems loading Jquery in functions.php

You have multiple errors here. You’re including CSS and JS on the same and wrong hook For JS you could use wp_enqueue_scripts For CSS you could use wp_print_styles wp_register_script / wp_enqueue_script only accepts 4 parameters. You should only register your scripts and enqueue only the last one with its dependencies. Use the third parameter to … Read more

How to Run a jQuery Script after a Javascript Script has Finished in WordPress

To accomplish this, wrap wp_enqueue_script in a function and run it through the action hook wp_enqueue_scripts while using the ‘priority’ parameter available in add_action to set the load order. function these_go_first() { wp_enqueue_script(‘first_script’, ‘[path to file]/first.js’, array(‘jquery’), ‘1.0’ ); } function these_go_first() { wp_enqueue_script(‘after_script’, ‘[path to file]/after.js’, array(‘jquery’, ‘first_script’), ‘1.0’ ); } add_action(‘wp_enqueue_scripts’, ‘these_go_first’, 1); … Read more

How to install Lavalamp jQuery effect in wordpress [duplicate]

<script language=”javascript” type=”text/javascript” src=”https://wordpress.stackexchange.com/questions/30944/wp-content/themes/metric /scripts/jquery-1.4.1.min.js”></script> <link rel=”stylesheet” href=”wp-content/themes/metric/lavalamp.css” type=”text/css” media=”screen” /> <script type=”text/javascript” src=”wp-content/themes/metric/scripts/jquery.easing.min.js”></script> <script type=”text/javascript” src=”wp-content/themes/metric/scripts/jquery.lavalamp.min.js”></script> <script type=”text/javascript”> jQuery(function() { jQuery(‘#nav’).lavaLamp({ fx: ‘backout’, speed: 700, click: function(event, menuItem) { return true; } }); }); </script>

WordPress Subpages Fancybox Trouble

So, if I understand your question correctly, your problem is that your iframes are showing the theme (nav menu, sidebar, etc.) and you don’t want them to. If that’s the case, I’d recommend creating a new Page Template that is styled after your bio iframe (no menus, no sidebar). There’s more info on creating custom … Read more

jquery: getting contents of #content field on post page

The div #editorcontainer contains a regular textarea #content and an iframe #content_ifr. The #content is filled with the saved contents of the post when the page loads. This means that any live edits of the content won’t be returned when calling jQuery(“#content”).html(). For the same reason, you get an empty string in the case of … Read more

Hiding the media-new.php File URL option via jQuery

This is because those elements aren’t present when the page is finished loading, they’re inserted later on using javascript. Try hooking into #media-items and running your code when new elements are inserted rather than when the root element is ready.

Add jQuery function to media button

Where are you attaching this listener: $(‘#fluffyRabbit’).live(‘click’,function() { alert(‘o hai!’); }); I suppose that if you attach within a $(document).ready(function(){ //attach here $(‘#fluffyRabbit’).live(‘click’,function() { alert(‘o hai!’); }); }; that would do the trick. Is it working for you?