2012-10-27 5 views
0

이 간단한 코드가 작동하지 않는 이유를 알아 내려고하고 있습니다. 나는이 구현 해요 : 여기 간단한 자바 스크립트 슬라이더 문제 w/html

http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

내 코드입니다 : 구문 오류가있는 경우

<script type="text/javascript"  src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 

<script type="text/javascript" src="fadeslideshow.js"> 

/*********************************************** 
* Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library  (www.dynamicdrive.com) 
* This notice MUST stay intact for legal use 
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more 
***********************************************/ 

</script> 

<script type="text/javascript"> 

var mygallery=new fadeSlideShow({ 
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow 
    dimensions: [750, 500], //width/height of gallery in pixels. Should reflect  dimensions of largest image 
     imagearray: [ 
     ["/images/allimages/vdance750x500.png", "", "", "Caption"], 
     ["/images/allimages/vpoca750x500.png", "", "", ""], 
     ["/images/allimages/vhat750x500.png", "", "", "" ], 
     ["/images/allimages/vdance750x500.png", "", "", ""] //<--no trailing comma  after very last image element! 
    ], 
    displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false}, 
    persist: false, //remember last viewed slide and recall within same session? 
    fadeduration: 500, //transition duration (milliseconds) 
    descreveal: "ondemand", 
    togglerid: "" 
}) 
</script> 


<title>Vanadia's Site</title> 





</head> 

<body> 

<div id="fadeshow1"></div> 

<br /> 


</body> 
</html> 

내가 코딩 궁금 새로운 오전 ... 모든 이미지 오른쪽에있는 자리. 나는 이것이 왜 작동하지 않는지 이해하지 못한다!

도움을 주시면 감사하겠습니다.

+1

구문 오류가있는 경우 디버거에서 알려야합니다. 크롬, 오페라 또는 파이어 폭스에서 Ctrl-Shift-I를 누르십시오. 예를 들어 f12를 누르십시오. – enhzflep

답변

0

코드를 복사하고 이미지 경로를 변경했습니다 (데모 : jsfiddle.net/hJKMy/). 이미지 경로가 잘못되었을 수 있습니다.

1

문서 유형 및 여는 html 및 head 태그는 어디에 있습니까? 어쩌면 여기에 포함시키지 않았을 지 모르지만 문서에서 누락되지 않았는지 확인하십시오. 그 외에도 브라우저의 JavaScript 콘솔에서 오류가 발생하는지 확인하십시오. 당신이 있다면, 모두 볼 수 있도록 게시하십시오.