Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
特定の色に基づいて Web ページをクエリしたいと考えています。私は現在、次のページhttp://api.jquery.com/を使用しています。ここで、青色のすべての要素を選択したいとします。これを行う最善の方法は何ですか?
filter()を使用して、指定された基準で一致した要素を除外できます。
ライブデモ
redColored = $('#parentid').children().filter(function(){ if(this.style.color == 'red') return $(this); })