2011-03-22 4 views
0

아주 간단한 페이지에서 jscrollpane을 사용하려고하지만 어떤 이유로 작동하지 않습니다. jscrollpane에 대한 스크립트를 제거 할 때 일반 스크롤 막대가있는 이미지이지만 포함 할 때 스크롤 막대가없는 이미지입니다. 나는 누군가가 외모를 가지고 명백하게 틀린 것이 있는지 볼 수 있는지 궁금합니다.성공하지 못한 jscrollpane을 처음으로 사용하려고 시도했습니다!

감사

http://nickharambee.dyndns.org/examples/jscrollpane.html 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 

<head> 

<!-- styles needed by jScrollPane --> 
<link type="text/css" href="jquery.jscrollpane.css" rel="stylesheet" media="all" /> 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> 

<!-- the mousewheel plugin - optional to provide mousewheel support --> 
<script type="text/javascript" src="jquery.mousewheel.js"></script> 

<!-- the jScrollPane script --> 
<script type="text/javascript" src="jquery.jscrollpane.min.js"></script> 

<script type="text/javascript"> 
    $(function() 
    { 
     $('.scroll-pane').jScrollPane(); 
    }); 
</script> 

<style> 

.scroll-pane { 
    width: 200px; 
    height: 200px; 
    overflow: auto; 
} 
</style> 
</head> 


<html> 
<body> 

<div class="scroll-pane"><img src="../files/nancy.jpg"></div> 

</body> 
</html> 

답변

0

jscrollpane 스크립트 태그 로딩인가? 가리키고있는 파일이 실제로 있는지 확인하십시오.

<script type="text/javascript" src="jquery.jscrollpane.min.js"></script> 

당신이 자바 스크립트 (예를 들어, 사파리, 크롬, 또는 방화범/w 파이어 폭스) 콘솔을 사용하여 브라우저가 경우에 당신은 $('.scroll-pane').jScrollPane를 입력 할 수 있으며, 그 다음 undefined 인 경우 라이브러리가 제대로로드되지 않습니다.

+0

답변 해 주셔서 감사합니다. 웬일인지 그것이 일하기 시작했다! 이유는 모르겠다. 콘솔 팁에도 감사드립니다. 능숙한. – Nick

관련 문제