Note that there are some explanatory texts on larger screens.

plurals
  1. POFiltering div's based on checkbox value
    primarykey
    data
    text
    <p>I wont bother with posting my jquery because I'm pretty sure it is all nonsense considering it doesn't cause any errors but still doesn't do anything...</p> <pre><code>&lt;h3&gt;Candidate Experience&lt;/h3&gt; &lt;div class="search_box"&gt; &lt;input type="checkbox" name="3year" id="3yearexp" value="1"&gt; 3+ Years &lt;br&gt; &lt;input type="checkbox" name="5year" id="5yearexp" value="2"&gt; 5+ Years &lt;br&gt; &lt;input type="checkbox" name="7year" id="7yearexp" value="3"&gt; 7+ Years &lt;br&gt; &lt;input type="checkbox" name="10year" id="10yearexp" value="4"&gt; 10+ Years &lt;br&gt; &lt;/div&gt; &lt;h3&gt;&lt;br&gt;Candidate Salary&lt;/h3&gt; &lt;div class="search_box"&gt; &lt;input type="checkbox" name="3039" value="s29"&gt; less than £29,999&lt;br&gt; &lt;input type="checkbox" name="3039" value="s3039"&gt; £30,000 - £39,999 &lt;br&gt; &lt;input type="checkbox" name="4059" value="s4059"&gt; £40,000 - £59,999 &lt;br&gt; &lt;input type="checkbox" name="6079" value="s6079"&gt; £60,000 - £79,999 &lt;br&gt; &lt;input type="checkbox" name="80plus" value="80plus"&gt; £80,000 + &lt;br&gt; &lt;/div&gt; &lt;div class="talent_result_wrapper" data-experience="10yearexp" data-salary="s6079"&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Talent ID: &lt;/strong&gt;100007&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Resides: &lt;/strong&gt;London&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Salary Required: &lt;/strong&gt;£67000&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Experience: &lt;/strong&gt;10 Years &lt;/li&gt; &lt;li&gt;&lt;strong&gt;Industy: &lt;/strong&gt;24&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Specialism: &lt;/strong&gt;24&lt;/li&gt; &lt;/ul&gt; &lt;div&gt; &lt;br&gt; &lt;br&gt; &lt;div class="talent_result_wrapper" data-experience="5yearexp" data-salary="s3039"&gt; &lt;ul&gt; &lt;li&gt;&lt;strong&gt;Talent ID: &lt;/strong&gt;100006&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Resides: &lt;/strong&gt;London&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Salary Required: &lt;/strong&gt;£35000&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Experience: &lt;/strong&gt;5 Years &lt;/li&gt; &lt;li&gt;&lt;strong&gt;Industy: &lt;/strong&gt;24&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Specialism: &lt;/strong&gt;15&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre> <p>I'm trying to use the checkboxes to filter out results. I've been googling this for days but i'm still pretty new to jquery so I'm really struggling. Basically if I tick the 5 years experience checkbox, it should show the second result, likewise if I click the 10 years one it should show the first, or if I have both it should show both.</p> <p>Similarly it would need to work with the salary, so if I checked the 30k -39k box, it should show the second result, and if i checked the 10 years and 30k - 39k it should show nothing.</p> <p>Does this make sense?</p> <p>I've created a fiddle for this: <a href="http://jsfiddle.net/MCam435/hpej8/" rel="nofollow">http://jsfiddle.net/MCam435/hpej8/</a></p> <p>I've been trying to recreate something similar to this fiddle, but all i've managed to do is hide the entire content of my page!! <a href="http://jsfiddle.net/mattball/d2v4Q/" rel="nofollow">http://jsfiddle.net/mattball/d2v4Q/</a></p> <p>Can anyone help please?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload