I'm trying to implement this jquery script into a Wordpress page but having trouble making it work.. Does anyone know how I can make this work in a Wordpress page? http://jsfiddle.net/SO_AMK/a9dnW/3/ Thanks!
The same way you would make it work on a non-Wordpress site. Download and install jQuery (too many tutorials already available for me not to explain it from the very beginning); Add that script block at the end of your page (before the closing body tag).
Hi, Wordpress inbuilt jquery does'nt understands $ sign. You should use jQuery instead. For example $("#test p").delay(1000).animate({"opacity": "1"}, 700); Code (markup): change to jQuery("#test p").delay(1000).animate({"opacity": "1"}, 700); Code (markup): or you can pass $ in ready function and use your previous code without any problem. jQuery(document).ready(function ($) { $("#test p").delay(1000).animate({"opacity": "1"}, 700); } Code (markup):
Sounds good thanks for the information. So If I'm trying to add this to a page how would I do that? Would I add the script to the page like this? I'm doing something wrong because it isn't working. <script> jQuery(document).ready(function ($) { $("#test p").delay(1000).animate({"opacity": "1"}, 700); }</script> Code (markup):
You still have a $ in there <script> jQuery(document).ready(function ($) { jQuery("#test p").delay(1000).animate({"opacity": "1"}, 700); }</script> Code (markup): Oh, and never link to your own copy of jQuery, use the one that wordpress has.
Thanks for the help I'm completely new to Jquery/Javascript. I can't seem to get this working still... Can someone check out the page I'm working on and direct me how to get the script working? I appreciate it!
I'm aware of that but I just can't get it to work, maybe it's not compatible with Wordpress's default jquery or something? I'm running the latest version of Wordpress with the Inovado theme. Here is the page I am trying to develop maybe someone could see what I'm doing wrong: http://trailviewer.com/dev/register
I use chrome so I 'inspected' the page and got this Is fancybox a standard jquery plugin that you've chosen to use or did it come with the Inovado theme? I suspect (but don't know for sure) that wordpress needs a different version of the plugins because of the jQuery versus $ thing. If it came with the theme then go back to the theme creator and ask why the plugin might be throwing errors. If you've chosen to use it then do a search for how to use jquery plugins with wordpress.
I believe fancybox is built into the theme because I didn't install it and it's not in the plugin menu.
I got That you have not defined jquery. This is way to do in wordpress. add_action('wp_enqueue_scripts','load_javascripts'); function load_javascripts(){ wp_enqueue_script('jquery'); } PHP: This will add jquery in header of theme. Add this in functions.php