jQuery
New Wave Javascript


discuss » Paragraph with ID


Posted: Tue Feb 14 09:24:39 EST 2006
From: Daniel Acuff <jojowebdev at gmail.com >

Hi, I want to revisit an example usage of jQuery I was attempting 2 weeks
ago.
Sample page:
http://www.jojowebdesign.com/skills/javascript/javascript_content.asp

I wanted to create a simple open / close section.

I got the correct head section script (or is it?):

<script type="text/javascript">
$(document).ready(function(){
$("#jQLink").toggle(function(){
$("#jQHide").slideUp("slow");
},function(){
$("#jQHide").slideDown("slow");
});
});
</script>

Then I set an ID to a P tag:

<p id="jQHide">

And then a link to call the function:

<a href="" id="jQLink">open / close</a>


But I get two resulting problems.

A. Using FireFox 1.5.0.1 (with web developers disable cache always on) it
does not open or close, the page is also reloaded. Reloaded because href is
set to " " ?

B. In IE6 it does do a SWEET open close but for some reason instead of doing
the ENTIRE P section it stops as soon as it gets to the <ol> ordered list
section. Why is that?

Thanks in advance for any help if you have time.

--

Dan Acuff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jquery.com/pipermail/discuss_jquery.com/attachments/20060214/e0456e95/attachment.htm