开发者

Excluding one input from .each actions

开发者 https://www.devze.com 2023-01-12 18:32 出处:网络
Given an input defined thusly: <input type=\"text\" id=\"connectionsCount\" /> shouldn\'t this code exclude actions that would otherwise execute.

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

精彩评论

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