I’ve been staring at my code for hours now trying to work out why this seemingly simple play around with jQuery isn’t working:
<!DOCTYPE HTML>
<html>
<head>
<title>title</title>
<meta charset="UTF-8">
<meta name="keywords" content="test">
<meta name="description" content="test">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<p class='box' id='title'>"test"</p>
<div class='gallery'>
<p class='tNail' id='one'>
<p class='tNail' id='two'>
<p class='tNail' id='three'>
<div class='clear'></div>
<p class='tNail' id='four'>
<p class='tNail' id='five'>
<p class='tNail' id='six'>
<div class='clear'></div>
</div>
<div class='clear'></div>
<p class='footer'>test 2011 <a href='#'>test</a></p>
</body>
<script type="text/javascript" src="jquery.js"></script>
<script>
$(document).ready(function()
{
$(".tNail").click(function()
{
$(this).effect("scale", {percent:200, direction:'both'}, 1000);
});
});
</script>
</html>
I’ve tried using noConflict() to no avail. If anyone can shed some light I’d be grateful.
Thanks.
Ah, looking again, I think the error message is probably “
$(this).effectis not a function” (which is rather different from${this}). You haven’t loaded jQuery UI, which is where theeffectmethod is defined.Include the jQuery UI library and try again.