FWDrew
10-15-2008, 12:41 AM
Hi all,
Im pretty frustrated with this, as I feel like I am missing something really simple but just cant figure it out. Basically I was going to use jQuery to animate the "search" image at the top. After this didnt work, I realized I couldnt get any jquery to work :o
So I went back to basics to try a very simple script and just cant get any jQuery to work.
Code:
$(document).ready(function(){
("a#searchAnimate").click(function(event){
alert("As you can see, the link no longer took you to jquery.com");
event.preventDefault();
});
});
Some of Relevenat HTML:
<ul><li id="searchBox">
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li></ul>
<div style="display:block;"><a href="http://jquery.com" id="searchAnimate" title="Search"><img class="search" src="wp-content/themes/splat!/style/images/search.png" alt="Search" /></a></div>
Test page is here (http://premiumthemes.net84.net/wordpress).
If you view the page, you can see the scripts are being called properly in the head and appear inf firebug, I thought it might have been a path issue, so threw in the absolute path and still couldnt get it to work.
So, any ideas what have I done wrong? Appreciate any help or advice :)
Best Regards,
Drew
Edit-Just would like to add before someone tells me to correct them, the 4 html markup errors are just from the free host that I use tracking script, the actual page and markup is valid :thumbsup:
Im pretty frustrated with this, as I feel like I am missing something really simple but just cant figure it out. Basically I was going to use jQuery to animate the "search" image at the top. After this didnt work, I realized I couldnt get any jquery to work :o
So I went back to basics to try a very simple script and just cant get any jQuery to work.
Code:
$(document).ready(function(){
("a#searchAnimate").click(function(event){
alert("As you can see, the link no longer took you to jquery.com");
event.preventDefault();
});
});
Some of Relevenat HTML:
<ul><li id="searchBox">
<?php include (TEMPLATEPATH . '/searchform.php'); ?>
</li></ul>
<div style="display:block;"><a href="http://jquery.com" id="searchAnimate" title="Search"><img class="search" src="wp-content/themes/splat!/style/images/search.png" alt="Search" /></a></div>
Test page is here (http://premiumthemes.net84.net/wordpress).
If you view the page, you can see the scripts are being called properly in the head and appear inf firebug, I thought it might have been a path issue, so threw in the absolute path and still couldnt get it to work.
So, any ideas what have I done wrong? Appreciate any help or advice :)
Best Regards,
Drew
Edit-Just would like to add before someone tells me to correct them, the 4 html markup errors are just from the free host that I use tracking script, the actual page and markup is valid :thumbsup: