ライトボックスを使ってスクロール可能なギャラリーをオンラインにする予定です。エラーが発生しました。コードの 1 つに予期しない " : " があり、次のいずれかが必要です: "}" 、" " 、 ATTR
CMS の使用をシンプルに。cmsms エラーの場合、表示されます
/xxx/xxx/public_html/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php ファイルの 702 行目
これは、私のウェブサイトに配置する予定のコードです。 http://sorgalla.com/jcarousel/
ここにエラーを投稿し、その後に完全なスクリプトを投稿します。
エラーコード。
jQuery("#gallery-prev").click(function(){
if(jQuery("#gallery").position().left < 0 && !jQuery("#gallery").is(":animated")){
jQuery("#gallery").animate({left : "+=" + imageWidth + "px"});
}
return false;
});
完全なコード。
<script type="text/javascript">
$(window).load(function(){
// Gallery
if(jQuery("#gallery").length){
// Fancybox
jQuery("#gallery li a").fancybox({
'titleShow' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'elastic'
});
// Variables aren't use properly due to Webkit
var totalImages = jQuery("#gallery > li").length,
imageWidth = jQuery("#gallery > li:first").outerWidth(true),
totalWidth = imageWidth * totalImages,
visibleImages = Math.round(jQuery("#gallery-wrap").width() / imageWidth),
visibleWidth = visibleImages * imageWidth,
stopPosition = (visibleWidth - totalWidth);
jQuery("#gallery").width(totalWidth);
jQuery("#gallery-prev").click(function(){
if(jQuery("#gallery").position().left < 0 && !jQuery("#gallery").is(":animated")){
jQuery("#gallery").animate({left : "+=" + imageWidth + "px"});
}
return false;
});
jQuery("#gallery-next").click(function(){
if(jQuery("#gallery").position().left > stopPosition && !jQuery("#gallery").is(":animated")){
jQuery("#gallery").animate({left : "-=" + imageWidth + "px"});
}
return false;
});
}
});
</script>
すべての助けに感謝します。ありがとう