我想弄清楚如何使用jquery過濾輸入/輸出內容與複選框。對於jquery來說,我很新,我不知道如何以正確的方式來處理這個問題。如何使用複選框過濾內容? - jQuery
我想三個複選框是這樣的:
<div class="check_filter">
<div id="filter">
<input type="checkbox" id="apple" /><label for="apple">Apple</label>
<input type="checkbox" id="pear" /><label for="pear">Pear</label>
<input type="checkbox" id="peach" /><label for="peach">Peach</label>
</div>
</div>
然後,我將有可能被過濾的內容:
<div id="content" >
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p>Vestibulum consectetur ipsum sit amet urna euismod imperdiet aliquam urna laoreet.</p>
<p>Curabitur a ipsum ut elit porttitor egestas non vitae libero.</p>
<p>Pellentesque ac sem ac sem tincidunt euismod.</p>
<p>Duis hendrerit purus vitae nibh tincidunt bibendum.</p>
<p>Nullam in nisi sit amet velit placerat laoreet.</p>
<p>Vestibulum posuere ligula non dolor semper vel facilisis orci ultrices.</p>
</div>
我想篩選出的數據的最佳方式時,該複選框被選中或未選中。
謝謝你對此的任何幫助。
哪些數據需要過濾?某些段落標籤? – 2010-08-09 18:36:24