我的頁面上有一個Galleriffic幻燈片。現在,「大」圖片鏈接到幻燈片中的下一張圖片。我怎樣才能讓它鏈接到外部文件呢?Galleriffic鏈接
2
A
回答
10
首先,你要隱藏的div或span標籤添加到您的無序列表:
<li>
<a class="thumb" href="/imageurl/image.gif">imageititle</a>
<span id="project-path" style="display:none;">example_path</span>
</li>
然後,該代碼添加到您的galleriffic.js文件。你是從span元素抓住了路徑:
addImage: function(listItem, thumbExists, insert, position) {
var $li = (typeof listItem === "string") ? $(listItem) : listItem;
var $aThumb = $li.find('a.thumb');
** var $path = $li.find('#project-path');
** var projectPath = $path.text();
var slideUrl = $aThumb.attr('href');
var title = $aThumb.attr('title');
var $caption = $li.find('.caption').remove();
var hash = $aThumb.attr('name');
然後,你的價值添加到圖像變量:
var imageData = {
** projectPath:projectPath,
title:title,
slideUrl:slideUrl,
caption:$caption,
hash:hash,
gallery:this,
index:position
};
現在告訴畫廊改變對全鏈接瓦特/新路徑-size圖庫圖片:
// Construct new hidden span for the image
var newSlide = this.$imageContainer
.append('<span class="image-wrapper current"><a class="advance-link" rel="history" href="/project/'+imageData.projectPath+'" title="'+imageData.title+'"> </a></span>')
.find('span.current').css('opacity', '0');
這裏註釋掉畫廊的點擊動作,使您的用戶可以只使用正常的鏈接包裹的圖像:
newSlide.find('a')
.append(imageData.image)
//.click(function(e) {
//gallery.clickHandler(e, this);
//})
;
0
是的 - 在http://prestondentalgroup.com.au/downloads.html 幻燈片圖像上的超鏈接允許查看器打開/保存PDF文檔。 很好地工作(一旦我解密瞭如何編寫example_path並用PDF文件的URL替換/ project /包含子文件夾) 所以要從站點的images/downloads /文件夾鏈接到readme.pdf, example_path變成了圖像/downloads/readme.pdf
和 /項目/ HTTP變成:/prestondentalgroup.com.au/
相關問題
- 1. 鏈接到jQuery組合樣式庫(Galleriffic)上的特定項目
- 2. jQuery和galleriffic
- 3. 與Galleriffic 2.0
- 4. Extend Galleriffic buildImage
- 5. Galleriffic with lightBox
- 6. Galleriffic - 鏈接到頁面外部的圖庫中的特定圖像
- 7. 更改Galleriffic控件
- 8. jquery image swap - for galleriffic
- 9. galleriffic不能正常工作
- 10. Views Galleriffic分頁不顯示
- 11. diplaying圖像jQuery插件:Galleriffic
- 12. 與IE7 Galleriffic插件問題
- 13. 將fancybox整合到galleriffic中
- 14. jQuery的Galleriffic幻燈片
- 15. Galleriffic插件多餘的空格
- 16. jquery galleriffic不能正常工作
- 17. jQuery內聯的jQuery Galleriffic問題
- 18. Galleriffic不能在IE7或IE8中工作
- 19. 用燈箱整合Galleriffic,怎麼樣?
- 20. 識別Galleriffic中的活動圖像
- 21. 鏈接不鏈接
- 22. 軟鏈接和硬鏈接
- 23. 鏈接按鈕鏈接
- 24. Href鏈接和鏈接
- 25. 塊鏈接內部鏈接
- 26. 鏈接內的鏈接?
- 27. 鏈接不顯示鏈接
- 28. 鏈接內的鏈接?
- 29. PromiseKit 3.0:鏈接鏈接
- 30. libjvm.so:鏈接或不鏈接?
謝謝你這麼多,我會嘗試這一點,並讓你知道我是如何得到的 – user374557 2010-06-23 19:34:13
謝謝你,這是。非常有幫助和工作。 – 2011-05-06 13:03:36
它也幫助我:) – 2012-07-06 12:13:10