IE8에서는 토글이 작동하지만 아래 내용이 오버레이됩니다. 다른 모든 브라우저에서 정상적으로 작동합니다.IE8에서 .toggle이 제대로 작동하지 않습니다.
$(document).ready(function() {
$('.toggle').hide();
$('.expand-all').click(function(){
// switch visibility
$(this).data('is_visible', !$(this).data('is_visible'));
// change the link depending on whether the element is shown or hidden
$(this).html((!$(this).data('is_visible')) ? 'Expand all' : 'Hide');
$(this).next().toggle();
return false;
});
});
HTML :
<div id="categories">
<div class="cat">
<h3>Rice</h3>
<ul>
<li><a href="">Rice brand 1</a></li>
<li><a href="">Rice brand 2</a></li>
<li class="expand-all">Expand all</li>
<div class="toggle">
<li><a href="">Rice brand 1</a></li>
<li><a href="">Rice brand 1</a></li>
</div>
</ul>
</div>
<div class="cat">etc</div>
<div class="cat">etc</div>
<div class="cat">etc</div>
</div>
jquery가로드되지 않고 있음을 나타내는 javascript 콘솔이 표시됩니다. JS 리소스의 URL은 'tangola1.local'입니다. –
죄송합니다. jquery 파일이 로컬로로드되었습니다. 그것은 지금 크롬/파이어 폭스에서 작동해야합니다 – Cris
IE8에서 나를 위해 잘 작동합니다. 아마 당신은 당신이보고있는 문제를 기술해야합니다. –