SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Aug 2008
    Posts
    321
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hide and show Answer to Questions.

    So, I had this jquery working just fine and then I put it into wordpress. I've double checked to see if I copied and pasted my original code correctly and I believe that I did. Any suggestions?

    http://newstartlaw.com/bankruptcy/

    I'm going to look at it one more time, but any pointers would be helpful.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Here's what I'm seeing in your HTML code

    Code:
    <p><!--faq_question--></p>
    <p>                </br></p>
    <p class="BUTTON">
    <p>				<a class="ViewAnswerButton"></p>
    <p>				</a></p>
    <p>				<a class="HideAnswerButton"></p>
    <p>				</a></p>
    And here's what I'm seeing in your script.

    Code javascript:
    $('.BUTTON').click(function(){
        ...
    });

    Paragraphs can't wrap each other, so what you've done there doesn't seem to be capable of working.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •