2012-08-08 2 views
1

jQuery로 DropDown 메뉴를 만들었습니다. IE7을 제외한 모든 기능이 뛰어납니다. 전혀 작동하지 않습니다. 마지막 링크 만 굵게 표시합니다. 디버깅하는 방법을 모르겠습니다.IE7에서 메뉴가 보이지 않는다.

나는

사람이 솔루션이 있습니까 this fiddle.

을 만들어?

$(".link-dropdown").on({ 
     click: function(){ 
      var $this = $(this); 

      if ($this.parent().next().is(":visible")){ 
       $('.opening-holder').hide(); 
       $('.link-dropdown').css({ 
        'fontFamily': 'Geogrotesque-Regular, Arial, sans-serif' 
       }); 
      } else { 
       $('.opening-holder').hide(); 
       $('.link-dropdown').css({ 
        'fontFamily': 'Geogrotesque-Regular, Arial, sans-serif' 
       }); 

       $this.css({ 
        'fontFamily': 'Geogrotesque-SemiBold, Arial, sans-serif' 
       }); 

       $this.parent().next().show(); 
       $this.parent().next().children().show(); 
      } 

      return false; 
     } 
    }); 
+0

여기에 관련 코드를 게시하고 적절한 문제 설명을 추가하십시오. "전혀 작동하지 않음"은 ** 오류 메시지 ** 또는 ** 문제 설명 **이 아닙니다. – PeeHaa

+0

좀 더 많은 정보를 추가했습니다. 예 : – bla0009

+0

예를 들어 바이올린을 만들었습니다. 해결책입니다. http://jsfiddle.net/EMnw3/27/ – bla0009

답변

0

그것은 당신이 :visible을 사용한 사실을 함께 할 수있다 :

이 작동하지 않습니다 JS입니다.

난 그냥 jQuery를 스크립팅을 변경 한하고 다음과 같이 노력하고 있습니다 :

+0

$ this.parent(). next(). is (": not (: hidden)") 대신 if ($ this.parent(). next(). (": visible)) 그리고 작동하지 않습니다. – bla0009

+0

죄송합니다 - 내가 나쁜 SO 답변에 대한 링크를 추가했다는 것을 믿을 수 없다! – McNab

0

이 시도

$(function(){ 
    $(".link-dropdown").on({ 
     click: function(){ 
      var $this = $(this); 

      if ($this.css("dispaly") == "block;"){ 
       $('.opening-holder').hide(); 
       $('.link-dropdown').css({ 
        'fontFamily': 'Geogrotesque-Regular, Arial, sans-serif' 
       }); 
      } else { 
       $('.opening-holder').hide(); 
       $('.link-dropdown').css({ 
        'fontFamily': 'Geogrotesque-Regular, Arial, sans-serif' 
       }); 

       $this.css({ 
        'fontFamily': 'Geogrotesque-SemiBold, Arial, sans-serif' 
       }); 

       $this.parent().show(); 
       $this.parent().children().show(); 
      } 

      return false; 
     } 
    }); 
}); 
+0

지금은 Chrome에서 작동하지 않으며 IE에서만 작동합니다. – bla0009

관련 문제