Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8975885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:59:30+00:00 2026-06-15T18:59:30+00:00

Designer learning to code here, not too far along in my js or using

  • 0

Designer learning to code here, not too far along in my js or using jquery. Attempting to get a checkbox filter pretty much the same as this guy: http://jsfiddle.net/BCbeU/ but can’t seem to get it to run like the jsfiddle on the site I’m building.

Here is my html for the checkboxes:

    <div class="tags">
    <label><input type="checkbox" rel="all"/> Show All </label>
    <label><input type="checkbox" rel="one"/> 1 Bedroom </label>
    <label><input type="checkbox" rel="two"/> 2 Bedroom </label>
    <label><input type="checkbox" rel="below"/> Below $1500 </label>
    <label><input type="checkbox" rel="above"/> Above $1500 </label>
</div>

Here is my html for the items I’m trying to filter:

<div id="shelf1-housing">
<ul class="results">
    <li class="all one">
        <a href="html/sessionone.html">
            <div class="box">
                <img src="../images/apartment2.jpg">
                    <h4>3 Bedroom Apartment</h4>
                    <h5>$1500 a month</h5>
            </div>
        </a>
    </li>

    <li class="all below">
        <a href="html/sessionone.html">
            <div class="box">
                <img src="../images/apartment1.jpg">
                    <h4>3 Bedroom Apartment</h4>
                    <h5>$1500 a month</h5>
            </div>
        </a>
    </li>

    <li class="below all">
        <a href="html/sessionone.html">
            <div class="box">
                <img src="../images/apartment2.jpg">
                    <h4>3 Bedroom Apartment</h4>
                    <h5>$1500 a month</h5>
            </div>
        </a>
    </li>

    <li class="all above">
        <a href="html/sessionone.html">
            <div class="box">
                <img src="../images/apartment1.jpg">
                    <h4>3 Bedroom Apartment</h4>
                    <h5>$1500 a month</h5>
            </div>
        </a>
    </li>

    <li class="all">
        <a href="html/sessionone.html">
            <div class="box">
                <img src="../images/apartment2.jpg">
                    <h4>3 Bedroom Apartment</h4>
                    <h5>$1500 a month</h5>
            </div>
        </a>
    </li>

</ul><!--End of Results-->
</div><!--End of Shelf1-Housing-->

And here is the javascript:

$('div.tags').delegate('input:checkbox', 'change', function(){
     var $lis = $('.results > li').hide();
     //For each one checked
     $('input:checked').each(function(){
          $lis.filter('.' + $(this).attr('rel')).show();
     });      
});

Thanks in advance to for the help. Still learning the basics, and they haven’t got me this far yet, soon, but not yet 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:59:31+00:00Added an answer on June 15, 2026 at 6:59 pm

    I have created fiddle by copying code from your website. Please check http://jsfiddle.net/LXymq/

    Following changes made:
    1) Added the Li back to a div with class called results. This is how you had it.
    <div class="results"> ... All LIs ... </div>

    2) Added all your code to $(document).ready function as the code was getting executed before the dom was ready.

    $(document).ready(function() { ... all your code inside this .... });

    4) Hardcoded the image path for beauty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Share Point Designer 2010. I want to conduct client side validation (jquery) but
I've been tasked with learning Lotus Domino Designer - not sure what I did
I'm using EF4.3. It's my first project so I'm learning as I go along.
I'm using Visual Studio 2010 Beta 2 to get a head start on learning
I'm a fairly inexperienced web designer learning css/html on the fly for a company's
I am not the designer for these reports, so please bear with me for
I'm learning to program using C# and ASP.NET with a SQL Server database. I
I'm a web designer learning WPF. One of the things I need to learn
I already started learning online but everything out there seems oriented to developers not
I am learning expression blend using the following link http://visitmix.com/labs/rosetta/EyesOfBlend/DataTemplates/ It is a very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.