gpt4 book ai didi

jQuery 图片选择

转载 作者:行者123 更新时间:2023-12-01 08:15:41 25 4
gpt4 key购买 nike

这应该是非常不言自明的,非常感谢任何帮助!

Jquery 代码

    $("#larrow img").hide();
$("#rarrow img").hide();

$("#rarrow").hover(arrowIn,arrowOut);
$("#larrow").hover(arrowIn,arrowOut);

function arrowIn()
{
$(this+" img").show()
}
function arrowOut()
{
$(this+" img").hide()
}

我也尝试过以 img 作为背景

    $("#larrow").css('visibility','hidden');
$("#rarrow").css('visibility','hidden');

$("#rarrow").hover(arrowIn,arrowOut);
$("#larrow").hover(arrowIn,arrowOut);

function arrowIn()
{
$(this).css('visibility','visible')
}
function arrowOut()
{
$(this).css('visibility','hidden')
}

显然没有用,提前感谢您的帮助!

最佳答案

您无法将 thisimg 选择器连接起来。不管怎样,这段代码可能会更短:

function arrow() {
$("img", this).toggle();
}

$("#larrow img, #rarrow img").hide();
$("#rarrow, #larrow").hover(arrow);

演示: http://jsfiddle.net/4fHL3/

关于jQuery 图片选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10866963/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com