I don't know if it's just a typo on this post, but you're missing a starting
double-quote in the first statement of your click handler function...
$("a.comment_toggle").click(function(){$(div.comment").toggle();
return false;});
should be
$("a.comment_toggle").click(function(){$("div.comment").toggle();
return false;});
Dave-237 wrote:
>
>
> I've been following several tutorials, trying to learn JQuery and I've
> been having some difficulty with what should be a trivial task. When
> I click a link to activate something like a <div> toggleing in and out
> of site, I get jumped to the top of the page. Also, my functions
> don't seem to be working. Can somebody help me with this?
>
> # [show comments]
> <script type="text/javascript">
> $(document).ready(function(){
>
> $("a.comment_toggle").click(function(){$(div.comment").toggle();
> return false;});
> });
> </script>
> <div class="comment">Here is the comment</div>
>
> CSS
> .comment {
> display: none;
> border: 1px black solid;
> }
>
>
>
--
View this message in context:
http://www.nabble.com/Page-Reload-On-Link-Click-tf4428749s15494.html#a12634600
Sent from the JQuery mailing list archive at Nabble.com.