如何将 link 添加到我图库中的图片和另一个滑块
How can I add a link to a pic in my gallery and another slider
我正在尝试将 link 添加到我图库部分的 infobig2.jpg 图片中。进入画廊后,我还想添加另一张幻灯片。我的网站在信息图表部分是 www.24kdesignz.com 我希望图片 link 到 http://vs0022.businesscatalyst.com/
<img class="img-responsive project-image" src="assets/images/info.jpg" alt=""><!--Project thumb -->
<div class="hover-mask">
<h2 class="project-title">Infographic</h2><!--Project Title -->
<p>Illustrated | Icon Driven</p><!--Project Subtitle -->
</div>
<!--==== Project Preview HTML ====-->
<div class="sr-only project-description" data-images="assets/images/infobig.jpg,assets/images/infobig2.jpg" >
<p>Infographics – An Infographic is a visual representation of data and information that is presented through a series of design-centric graphics. Its sole purpose is to educate viewers on a topic in a simplistic way – with information that is easy to digest.</p>
</div>
</article><!--End Project Item -->
检查您的网站后,您似乎有很多插件。使用名为 "Masonry." 的 jQuery 库注入您网站主题中的投资组合项目部分 在您的项目资产 >> javascript 文件夹中还有一个名为 "scripts.js" 的文件 - 这是主题作者将图像注入投资组合项目项目的位置。
解决方案:图片不能是 links。您必须将其包装在锚标记中。在您的具体情况下,您将不得不使用 jQuery.
假设您的 HTML 标记看起来像这样,为您想要成为 link:
的图像添加一个唯一的 id 选择器
<li id ="image2">
<img id ="uniqueId" src="/assets/images/infobig2.png">
</li>
然后用jQuery抓取并包裹在锚标签中:
$("#uniqueId").wrap($('<a>', {
href: '/assets/png/' + data.uniqueId
}));
如果您觉得编辑主题的 jQuery 代码不方便,这里的另一个解决方案是使用纯 html 在图像下添加一个 link。
我正在尝试将 link 添加到我图库部分的 infobig2.jpg 图片中。进入画廊后,我还想添加另一张幻灯片。我的网站在信息图表部分是 www.24kdesignz.com 我希望图片 link 到 http://vs0022.businesscatalyst.com/
<img class="img-responsive project-image" src="assets/images/info.jpg" alt=""><!--Project thumb -->
<div class="hover-mask">
<h2 class="project-title">Infographic</h2><!--Project Title -->
<p>Illustrated | Icon Driven</p><!--Project Subtitle -->
</div>
<!--==== Project Preview HTML ====-->
<div class="sr-only project-description" data-images="assets/images/infobig.jpg,assets/images/infobig2.jpg" >
<p>Infographics – An Infographic is a visual representation of data and information that is presented through a series of design-centric graphics. Its sole purpose is to educate viewers on a topic in a simplistic way – with information that is easy to digest.</p>
</div>
</article><!--End Project Item -->
检查您的网站后,您似乎有很多插件。使用名为 "Masonry." 的 jQuery 库注入您网站主题中的投资组合项目部分 在您的项目资产 >> javascript 文件夹中还有一个名为 "scripts.js" 的文件 - 这是主题作者将图像注入投资组合项目项目的位置。
解决方案:图片不能是 links。您必须将其包装在锚标记中。在您的具体情况下,您将不得不使用 jQuery.
假设您的 HTML 标记看起来像这样,为您想要成为 link:
的图像添加一个唯一的 id 选择器<li id ="image2">
<img id ="uniqueId" src="/assets/images/infobig2.png">
</li>
然后用jQuery抓取并包裹在锚标签中:
$("#uniqueId").wrap($('<a>', {
href: '/assets/png/' + data.uniqueId
}));
如果您觉得编辑主题的 jQuery 代码不方便,这里的另一个解决方案是使用纯 html 在图像下添加一个 link。