Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 07-23-2008, 04:52 PM jQuery problem
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
When clicking a button that is scripted with jQuery the information is not being displayed. Can you help?

HTML Code:
<input type="button" value="Continue" id="btnStep2"/>
<div id="step3">
 <label for="attrAllot">Attribute Order</label>
</div>
Javascript/jQuery
Code:
 $('#step3').addClass('close');
 $('#btnStep2').click(function() {
  $('#step3').removeClass('close').addClass('close');
 });
CSS
Code:
.open { display: block; }
.close { display: none; }
My Firefox Web Developer extension is not giving me a javascript error so I'm a bit lost as why it is not working right.

Here is the link to the page, you'll have to go through step 1 to get to step 2 to the problem button.



Thanks in advance.
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
 
Register now for full access!
Old 07-23-2008, 04:58 PM Re: jQuery problem
AliKat's Avatar
Extreme Talker

Latest Blog Post:
Save the Children
Posts: 176
Location: MS
Trades: 0
nevermind found it. It helps to proofread several times:

removeClass('close').addClass('close');
should be

removeClass('close').addClass('open'); -> DUH!!!!
AliKat is offline
Reply With Quote
View Public Profile Visit AliKat's homepage!
 
Old 07-23-2008, 05:27 PM Re: jQuery problem
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Hehe... was wondering about your logic there. Sometimes it is the simplest of mistakes that can be the most befuddling...
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to jQuery problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.51396 seconds with 12 queries