2013-08-14 3 views
0

나는 아래의 스크립트를 최신 참조에서 가져 왔습니다. jquery에서.iframe이 아코디언에서 작동하지 않습니다.

<html> 
<head> 
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css" /> 
<script type="text/jscript" src="java/jquery-1.9.1.js"></script> 
<script type="text/jscript" src="java/jquery-ui.min.js"></script> 

내 실수는 어디에서 볼 수 있습니까? 나는 그것을 고칠 수는 있지만 성공하지는 못했다.

<script type="text/jscript"> 
$(function() { 
$("#accordion").accordion({  
collapsible: true, 
heightStyle: "content", 
animate: {   
    duration: 200,   
    down: {    
    easing: "easeOutBounce",    
    duration: 1000   
    }  
    } 
}); 
}); 
</script> 

</head> 

<body> 

여기서부터 시작합니다. 설명을 위해 더미 링크를 추가했습니다. 나는 이것이 분명히 희망한다.

<div id="accordion" style="width: 240px; height: 400px;"> 

<h3>Rig Counts</h3> 
<div style="width: 238px; height: 270px;"> 
    <iframe name="I1" id="I1" src="https://amazon.com" frameborder="0" width="100%" height="100%" scrolling="no"> 
     </iframe> </div> 

<h3>Lost Time</h3> 
    <div style="width: 238px; height: 270px;"> 
    <iframe name="I2" id="I2" src="http://ebay.com" frameborder="0" width="100%" height="100%" scrolling="no"></iframe> </div> 

<h3>Rate Of Penetration</h3> 
    <div style="width: 238px; height: 270px;"> 
    <iframe name="I3" id="I3" src="https://yahoo.com" frameborder="0" width="100%" height="100%" scrolling="no"></iframe> </div> 

<h3>No Of Incident</h3> 
    <div style="width: 238px; height: 270px;"> 
    <iframe name="I4" id="I4" src="https://google.com" frameborder="0" width="100%" height="100%" scrolling="no"> 
     </iframe> </div> 


</div> 

</body> 

</html> 
+0

확인이 : –

답변

1

문제는 자바 스크립트 참조와 관련이있는 것으로 보입니다. 그것은해야

type="text/javascript" language="javascript" 

네, 나는 바로이 코드 시도 :

<!DOCTYPE HTML> 
    <html> 
     <head> 
      <link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> 
      <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> 
      <script type="text/javascript" language="javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> 
      <script type="text/javascript" language="javascript"> 
       $(function() { 
        $("#accordion").accordion({  
         collapsible: true, 
         heightStyle: "content", 
         animate: {   
          duration: 200,   
          down: {    
           easing: "easeOutBounce",    
           duration: 1000   
          }  
         } 
        }); 
       }); 
      </script> 
     </head> 
     <body> 
      <div id="accordion" style="width: 240px; height: 400px;"> 
       <h3>Rig Counts</h3> 
       <div style="width: 238px; height: 270px;"> 
        <iframe name="I1" id="I1" src="https://amazon.com" frameborder="0" width="100%" height="100%" scrolling="no"> 
        </iframe> 
       </div> 
       <h3>Lost Time</h3> 
       <div style="width: 238px; height: 270px;"> 
        <iframe name="I2" id="I2" src="http://ebay.com" frameborder="0" width="100%" height="100%" scrolling="no"></iframe> 
       </div> 
       <h3>Rate Of Penetration</h3> 
       <div style="width: 238px; height: 270px;"> 
        <iframe name="I3" id="I3" src="https://yahoo.com" frameborder="0" width="100%" height="100%" scrolling="no"></iframe> 
       </div> 
       <h3>No Of Incident</h3> 
       <div style="width: 238px; height: 270px;"> 
        <iframe name="I4" id="I4" src="https://google.com" frameborder="0" width="100%" height="100%" scrolling="no"> 
        </iframe> 
       </div> 
      </div> 
     </body> 
    </html> 
+0

당신의 도움에 감사드립니다 잘 작동 http://jsfiddle.net/abhishekjain/288Q8/ . 세 번째 및 네 번째 iframe이 작동하지 않는 이유는 무엇입니까? – Khalil

+0

제발 좀 더 도와주세요 ... – Khalil

+0

왜 나머지는 작동하지 않는 동안 처음 두 iframe 만 작동합니까? – Khalil

관련 문제