我想在滑块上的每个图像中添加链接。我在滑块上有7个图像,我想在每个不同的图像中添加不同的链接。 我如何添加超链接代码? 以下是我的代码:
<script>
$(function () {
"use strict";
$('#first_container').vegas({
color: '<?php echo $wa[custom_79];?>',
delay: <?php echo $wa[custom_80];?>,
transitionDuration: <?php echo $wa[custom_133];?>,
timer: false,
transition: null,
slides: [
<?php if ($wa[custom_82] != "" && $wa[custom_83] == "1") { $wa[custom_82] = str_replace(' ', '%20', $wa[custom_82]);?>
{src: '<?php echo $wa[custom_82];?>'},
<?php }
if ($wa[custom_84] != "" && $wa[custom_85] == "1") { $wa[custom_84] = str_replace(' ', '%20', $wa[custom_84]);?>
{src: '<?php echo $wa[custom_84];?>'},
<?php }
if ($wa[custom_86] != "" && $wa[custom_87] == "1") { $wa[custom_87] = str_replace(' ', '%20', $wa[custom_87]);?>
{src: '<?php echo $wa[custom_86];?>'},
<?php }
if ($wa[custom_88] != "" && $wa[custom_89] == "1") { $wa[custom_89] = str_replace(' ', '%20', $wa[custom_89]);?>
{src: '<?php echo $wa[custom_88];?>'},
<?php }
if ($wa[custom_90] != "" && $wa[custom_91] == "1") { $wa[custom_91] = str_replace(' ', '%20', $wa[custom_91]);?>
{src: '<?php echo $wa[custom_90]?>'},
<?php }
if ($wa[custom_92] != "" && $wa[custom_93] == "1") { $wa[custom_93] = str_replace(' ', '%20', $wa[custom_93]);?>
{src: '<?php echo $wa[custom_92]?>'},
<?php }
if ($wa[custom_94] != "" && $wa[custom_95] == "1") { $wa[custom_95] = str_replace(' ', '%20', $wa[custom_95]);?>
{src: '<?php echo $wa[custom_94];?>'},
<?php }
?>
],
init: function () {
setTimeout(function () {
$('#first_container').vegas('options', 'transition', '<?php echo $wa[custom_81];?>');
}, 1000);
}
});
$('a.previous').on('click', function () {
$('#first_container').vegas('options', 'transition', '<?php echo $wa[custom_81];?>').vegas('previous');
return false;
});
$('a.next').on('click', function () {
$('#first_container').vegas('options', 'transition', '<?php echo $wa[custom_81];?>').vegas('next');
return false;
});
});
</script>
我尝试了很多方法,但仍然没有运气。我很感激你的帮助。提前谢谢。