баян в IE6 - PullRequest
       12

баян в IE6

2 голосов
/ 02 января 2012

Может кто-нибудь помочь мне выяснить, почему мой скрипт аккордеона на http://www.mincovlaw.com/services/copyright все испортил в IE6?

В отличие от более современных браузеров, он вызывает два события onclick, если я нажимаю "защищено ли произведение авторским правом "," требуется ли разрешение на конкретное использование произведения "...

Я предполагаю, что это как-то связано с тем, что на 1009 * внутри <ul> есть щелчок., но я не уверен, как это исправить.

Любая помощь очень ценится.

РЕДАКТИРОВАТЬ: Код:

<script>
    function treatlink(e) {
        if (!e)
              e = window.event;

            if (e.cancelBubble)
              e.cancelBubble = true;
            else
              e.stopPropagation();
    }

    function togglemore(z) {
        y=document.getElementById(z);
        w=document.getElementById('img'+z);
        if (y.style.display=="none") { 
            y.style.display="block"; 
            w.src='/images/icons/closemore1.png'
        } else { 
            y.style.display="none"; 
            w.src='/images/icons/openmore1.png'
        }
    }


</script>

    <ul class="dash">

        <li class='dash' onclick='togglemore("service_a"); return false;'>Legal opinions as to:
            <a href='#' onclick='return false;'><img id='imgservice_a' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
            <div id='service_a' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'>Legal opinions may be provided in writing or as part of face-to-face, telephone or skype consultations.</div>
        </li>

        <ul class="dash">

        <li class='checkmark' onclick='togglemore("service01"); return false;'>whether a work is protected by copyright;
            <a href='#' onclick='return false;'><img id='imgservice01' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
            <div id='service01' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'><p><i>Copyright Act</i> provides that copyright subsists in &ldquo;every original literary, dramatic, musical and artistic work&rdquo;. However, the scope of copyright protection is not indefinite.<p>It is of utmost importance to clearly understand if a particular result of creative activity is protected by copyright &ndash; whether you are planning to rely on that IP as your asset or whether you are planning to use someone else&rsquo;s work.</div>
        </li>


        <li class='checkmark' onclick='togglemore("service02"); return false;'>whether a particular use of the work requires permission;
            <a href='#' onclick='return false;'><img id='imgservice02' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
            <div id='service02' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'><p>Even if a work is protected by copyright, not every single use of it requires permission from the copyright owner.<p>Some uses fall under the category of fair dealing, and some uses fall outside the legal definition of what &ldquo;use&rdquo; means under the <i>Copyright Act</i>.</div>
        </li>


        <li class='checkmark' onclick='togglemore("service03"); return false;'>whether a particular use of the work infringes copyright;
            <a href='#' onclick='return false;'><img id='imgservice03' src='/images/icons/openmore1.png' style='vertical-align:text-top; padding-left:8px; border:0px; padding-right:5px; position:relative; top:7px;' title='Read More' alt='Read More'></a>
            <div id='service03' style='display:none; width:600px;margin-left:50px;padding:6px;border:1px dotted #bbbbbb;'><p>Under the <i>Copyright Act</i>, it &ldquo;is an infringement of copyright for any person to do, without the consent of the owner of the copyright, anything that by this Act only the owner of the copyright has the right to do.&rdquo;<p>The question is whether a particular use falls under the scope of what only the owner of copyright can do and whether a particular use can be excused under the fair dealing provisions.</div>
        </li>

        </ul>

1 Ответ

3 голосов
/ 02 января 2012

IE6 игнорирует закрывающие теги </li>, поэтому внутреннее значение <ul>, имеющееся в строке 263 (которое неверно расположено), интерпретируется как находящееся внутри <li> над ним, тогда как в современных браузерах оно интерпретируется какбрат <li>.

Вы должны исправить инвалидность, поместив внутреннюю <ul> внутрь <li> внешней <ul>.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...