开发者

get the "display" attribute of the last element

Hy guys, How can I get the "dis开发者_StackOverflow中文版play" of the last element?

I'm doing this: $('.slide').filter(':last').attr("display"); but didn't work.

I tried $('.slide:last').attr("display"); and didn't work too.

What am I doing wrong? Tks!


Do you mean the CSS display property?

$('.slide:last').css('display')

Note that, if you're looking to check whether something is visible, it would be better to ask that question directly, rather than comparing the display property to "block" or "none".

$('.slide:last').is(':visible')


display is a CSS property. Try:

$('.slide:last').css("display");


I have a feeling you're talking about the css display property:

$('.slide:last').css("display");


Try this

$('.slide:last').css("display");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜