2012-04-02 8 views
0

このような構造の場合、#other_sectionの結果をどのように除外するのが最適でしょうか?ここで#find結果からのjQuery除外セレクタの一致

<form> 
    <input id=one> 
    <div id=other_section> 
    <input id=two> 
    </div> 
</form> 

が可能APIです:

inputs = @find(":input").exclude("#other_section :input") 
+0

あなたの質問を解釈する多くの方法があります。あなたは起こってほしかったことの例を提供してください。 – Blazemonger

答えて

0

は、ここに私のソリューションです:

$.fn.exclude = (selector)-> 
    excluded_items = @end().find(selector) 
    @filter -> 
    !_.include(excluded_items, this) 
関連する問題