我想知道是否有人能夠幫助我請。fancyBox和jQuery刪除工具衝突
我已經把它創建this圖片庫頁面的腳本。我正在使用'fancyBox'來創建幻燈片和一個jQuery的演示源於我已經適應提供刪除功能。
我身邊的我的這幾行代碼就是問題所在:
<ul id="gallery" class="gallery ui-helper-reset ui-helper-clearfix">
<?php for ($i = 0; $i < $descriptions->documentElement->childNodes->length; $i++) :
$xmlFile = $descriptions->documentElement->childNodes->item($i);
$name = htmlentities($xmlFile->getAttribute('originalname'), ENT_COMPAT, 'UTF-8');
$description = htmlentities($xmlFile->getAttribute('description'), ENT_COMPAT, 'UTF-8');
$source = $galleryPath . rawurlencode($xmlFile->getAttribute('source'));
$thumbnail = $thumbnailsPath . rawurlencode($xmlFile->getAttribute('thumbnail'));
?>
<li class="ui-widget-content ui-corner-tr">
<a class="fancybox" rel="allimages" title="<?php echo $name; ?>" href="<?php echo $source; ?>"><img src="<?php echo $thumbnail; ?>"alt="<?php echo $description; ?>" width="96" height="72"/> </a><a href="link/to/trash/script/when/we/have/js/off" title="Delete this image" class="ui-icon ui-icon-trash">Delete image</a>
<?php endfor; ?>
</li>
</ul>
連同這些線:<ul id="gallery" class="gallery ui-helper-reset ui-helper-clearfix">
和<li class="ui-widget-content ui-corner-tr">
及其各自的結束標記時,「的fancybox」功能不起作用。沒有他們,它工作正常。
我是比較新的jQuery和我一直在工作的這幾天和我似乎無法找到解決的辦法。
我只是想知道一個人是否有可能看這個,請讓我知道我要去哪裏錯了。
佛的其他信息,我已經添加了下面的「的fancybox」腳本。
<script type="text/javascript">
$('.fancybox').fancybox({
openEffect : 'elastic',
closeEffect : 'elastic',
padding : 20,
fitToView : true,
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
arrows : false,
helpers : {
title : {
type : 'inside'
},
buttons : {}
},
afterLoad : function() {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
}
});
</script>
許多的感謝和親切的問候
你好,非常感謝幫助我與此有關。我已經按照你的建議改變了上面兩行,但不幸的是,問題仍然存在。我已將'fancyBox'腳本添加到我的原始帖子中,我希望這是您的需要。請,如果有什麼你需要的,不要猶豫,問。親切的問候 – IRHM