Issue
So, after traversing google and Stack Overflow for a short while, most resources I found were people incorrectly including jQuery, which I included correctly.
I have this in my header:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php wp_head(); ?>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title>
<?php bloginfo('name'); ?>
</title>
<link href="<?php echo home_url(); ?>/css/styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
alert("Hey");
});
}
alert("hello");
And everything else I need in there. When I take out the document ready, it alerts hello, however with the doc ready it doesn't alert either. I have never had this problem before with jQuery.
Solution
You have a syntax error :) Try this!
$(document).ready(function() {
alert("Hey");
});
Answered By - Shannon
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.