当您单击它时,有人知道如何用另一个图像替换活动链接(这是我的代码中的图像)吗?
当您单击黄色卫生纸的图标时,我基本上希望将“黄色卫生纸”的图像替换为“黄色信封”。与其他图像相同!
有没有这样的解决办法??
(function($) {
var allPanels = $('.accordion > .day').hide();
$('.accordion > .click > a').click(function() {
allPanels.slideUp();
if($(this).parent().next().is(':hidden'))
{
$(this).parent().next().slideDown();
}
return false;
});
})(jQuery);
和 HTML:
<div class="accordion">
<div class="click">
<a href=""><img src="http://designmodo.github.io/Flat-UI/images/icons/svg/toilet-paper.svg"></a>
</div>
<div class="day">
<img src="http://designmodo.github.io/Flat-UI/images/icons/svg/mail.svg">
<p>Tomatillo sweet pepper carrot salad cress arugula. Kombu cabbage sorrel celery soko plantain tigernut caulie parsnip tomatillo spinach avocado. Spring onion water chestnut parsnip water spinach cress napa cabbage fennel beetroot.</p>
</div>
<div class="click">
<a href=""><img src="http://designmodo.github.io/Flat-UI/images/icons/svg/retina.svg"></a>
</div>
<div class="day">
<img src="http://designmodo.github.io/Flat-UI/images/icons/svg/clocks.svg"><p>Kohlrabi sea lettuce wattle seed mung bean asparagus cucumber chard salsify kombu beetroot radicchio black-eyed pea. Scallion salsify beetroot tigernut prairie turnip artichoke daikon celery turnip greens. Horseradish aubergine carrot gumbo maize collard greens potato caulie lentil arugula salsify rock melon fava bean celery.</p>
</div>
</div>