开发者

Excluding one input from .each actions

Given an input defined thusly:

<input type="text" id="connectionsCount" />

shouldn't this code exclude actions that would otherwise execute.

$("开发者_StackOverflow.cartOption .value .input").not('#connectionsCount').each(function () {


it would invoke on any matched elements that don't match #connectionsCount, so it applies to everything but that.


I found that the other selectors were parents of my #connectionsCount element so i needed to check the children:

.children().not('input:#connectionsCount')

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜