我的网站上有一张图片,每次点击它时,它都会滑动打开一个带有 4 个链接的框。图像从 0.6 不透明度开始,当您单击它打开框时,得到不透明度 1。但是我希望当您关闭框时,不透明度回到 0.6。
我的代码是:
jQuery(document).ready(function() {
jQuery('.toggle_hide').hide();
jQuery(".moduletable span").css('cursor', 'pointer').click(function() {
var $this = $(this);
$this.css({
opacity: '1'
});
$('.toggle_hide').not($this.next("div")).fadeOut(300);
$this.next("div").slideToggle(300);
});
});
希望你能帮助我。
最好的问候,马丁