Ah i see! I get you now! and its perfect! just what i want! and only 10
lines! WOW! Thank for all the help! you've made my day! AND you guys are so
nice to a noob around here! ususally if i post a simple question like this
and start telling you that you got the point of the topic wrong i get my bum
kicked!

AND now ive got a lil better understanding of how things work. Functions,
and changing class's etc!

Thank you VERY much everyone!

Also 2 more thing. could i put this into a new .js file and link it in the
header and it will still work? and what other 'fxs' can i have? Iv
experimented with the hide() and show() ones.


Karl Swedberg-2 wrote:
> 
> On Sep 9, 2006, at 7:27 AM, kevdotbadger wrote:
> 
>> It dont work sorry!
>> ....
>> any ideas? Also whats the deal with 'javascript:void(0)'? whast  
>> that do?
> 
> Hi, there are a couple things you can do to make this work.
> 
> 1. wrap your jquery code in $(document).ready(
> 
> 2. add "return false;" to your click events.
> 
> 3. by adding "return false;" you can get rid of the ugly  
> "javascript:void(0)" in your href. What you put in the href is up to  
> you, but you should consider "graceful degradation" when users have  
> javascript turned off.
> 
> I grabbed your example below and dropped it into a page on my site so  
> you can see a functioning example. Just view source from the page and  
> copy and paste what you want: http://sandbox.englishrules.com/show- 
> hide.htm
> 
> 
> Cheers,
> 
> Karl
> _______________________
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> 
> 
> 
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
>> <html>
>>
>>      <head>
>>              <title></title>
>>              <script type="text/javascript" 
>> src="jquery-latest.pack.js"></script>
>>              <script type="text/javascript">
>>                      $('#showCommentBox').click(function() {
>>                              $('#addcomment:hidden').slideDown();
>>                      });
>>                      $('#hideCommentBox').click(function() {
>>                              $('#addcomment').slideUp();
>>                      });
>>              </script>
>>              <style>
>>                      #addcomment {
>>                              display: block;
>>                              border: 1px solid red;  
>>                              width: 300px;
>>                              
>>                      }
>>              </style>
>>      </head>
>>      <body>
>>               javascript:void(0) Show Comment Form
>>              <div id="addcomment">
>>                      safglkjahdsgakljfhgad glkaf hj aflkjg haf g jk lkj aglj
>>                       javascript:void(0) Hide Comment Form
>>              </div>
>>      </body>
>> </html>
>>
>>
>>
> 
> 
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/little-help-tf2235942.html#a6229373
Sent from the JQuery forum at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to