다음과 같은 jQuery 코드 스 니펫은 Chrome 및 Opera에서 잘 작동하는 것으로 보이지만 관련 div를 숨기거나 표시 할 때 아무런 반응이 없습니다. Internet Explorer 또는 Firefox. 어떤 아이디어?jQuery hide/show div는 Opera/Chrome에서 작동하지만 IE/Firefox는 작동하지 않습니다.
$(function() {
$(".paste-meta-small .right a.collapse").click(function(event) {
$(this).parents(".paste-meta-small").next(".highlight").toggle(500);
$(this).text($(this).text() == 'show' ? 'hide' : 'show');
event.preventDefault();
})
})
$(function() {
$(".highlight-meta a.blog-collapse").click(function(event) {
$(this).parents(".highlight-meta").next(".blog-highlight").toggle(500);
$(this).text($(this).text() == 'show' ? 'hide' : 'show');
var margin = ($(this).text() == "show" ? "15px" : "0");
$(this).parents(".highlight-meta").css("margin-bottom", margin);
event.preventDefault();
})
})
동작하는 예제가 사전에 here
감사를 찾을 수 있습니다
무엇 당신의 HTML 모습입니까? (당신이 연결 한 페이지에서 내가 뭘보고 있어야하는지 이해가 안됩니다.) – Pointy
console.log()를 사용하려고 했습니까? 이렇게하면 어디서 붙어 있는지 확인할 수 있습니다. – adardesign
@ Pointy - ** ** 페이지입니다. 잠깐 나도 데려갔습니다. –