English 中文(简体)
如何以更简单的方式检查多个干 to的可见度?
原标题:How to check visibility of multiple div s in simpler way?

目前有一米使用低于标准但效果良好。

$("#topperAtBaseLevel:visible, #lowerAtBaseLevel:visible, #midAtBaseLevel").hide();

any optimised code? (i cant use same class) i mean how to use :visible rightly?

最佳回答

这是实现你所追求的目标的途径。 你们正在正确、高效地利用甄选者。

如果你维持一系列需要隐藏的政党的身份证,然后以动态方式建造你的挑选人,那么你就会更快地做到这一点。 (即使选择人可能更长,这也将会更快。) 国际发展学会的选择非常快。

但是,是否需要优化? 我们谈论的是,从闪光到杜布尔的照明速度快。 一位超级班子将做你所做的事。

问题回答

这部法律似乎完美无缺;你正在使用:是正确的。

http://api.jquery.com/visible-selector/“rel=“nofollow noreferer” Query:visible selectedor help page, 如果你想要确切知道如何运作,但用几句话来说,它选择了明显的要素 =

我可以认为:

$([id$=“AtBaselevel”]:visible .hide();

这将与任何在<代码>AtBaselevel中填写的识别资料相匹配。 更糟糕的是,时间较短并不意味着速度更快,因为国际发展学会的考量正像现在这样快。 以补计的遴选人并不选择。

你可以这样做:

$("#topperAtBaseLevel, #lowerAtBaseLevel, #midAtBaseLevel").filter(":visible").hide();

然而,由于这种结果,所有隐藏的物品,即:.hide(),就隐藏的元素而言,都是罚款,没有错,因此只能是:

$("#topperAtBaseLevel, #lowerAtBaseLevel, #midAtBaseLevel").hide();




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签