This javascript works in every browser EXCEPT for internet explorer!

Posted by user309641 on Stack Overflow See other posts from Stack Overflow or by user309641
Published on 2010-05-18T19:12:43Z Indexed on 2010/05/18 19:20 UTC
Read the original article Hit count: 176

Filed under:
|
|
|
|

The webpage is here: http://develop.macmee.com/testdev/

I'm talking about when you click the ? on the left, it is supposed to open up a box with more content in it. It does that in every browser except IE!

function question()
{
    $('.rulesMiddle').load('faq.php?faq=rules_main',function(){//load page into .rulesMiddle

        var rulesa = document.getElementById('rulesMiddle').innerHTML;
        var rules = rulesa.split('<div class="blockbody">');//split to chop off the top above rules

        var rulesT = rules[1].split('<form class="block');//split to chop off below rules
        rulesT[0] = rulesT[0].replace('class=','vbclass');//get rid of those nasty vbulletin defined classes
        document.getElementById('rulesMiddle').innerHTML = rulesT[0];//readd the content back into the DIV
        $('.rulesMain').slideToggle();//display the DIV
        $('.rulesMain').center();//center DIV
        $('.rulesMain').css('top','20px');//align with top
    });
}

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about internet