SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Javascript Expand Function Error - IE8

    I'm having a peculiar problem with some JavaScript on my website that I cannot seem to figure out and fix. The problem stems from Internet Explorer's inability to expand questions in the FAQ section of my website ( link: http://phonesforyourcharity.com/faq.php ). Of course the expand function works in Firefox and Safari.

    The <script type="text/javascript" src="js/faq.js"></script> in the source
    refers to:

    PHP Code:
    $(function(){
        
        $(
    "dd.answer")
            .
    hide();
        
        $(
    "dl.faq dt")
            .
    append("<br /><a href='#' title='Reveal Answer' class='answer-tab'>Answer</a>");
            
        $(
    ".answer-tab")
            .
    click(function(){
                $(
    this)
                     .
    parent().parent()
                     .
    find("dd.answer")
                     .
    slideToggle();
                return 
    false;
            });
    }); 
    Any help would be greatly appreciated!

  2. #2
    SitePoint Member
    Join Date
    May 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone know of an extend all code I could use?


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
  •