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 9010289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:25:00+00:00 2026-06-16T02:25:00+00:00

Despite almost completely copying this filtering demo , I still can’t get the the

  • 0

Despite almost completely copying this filtering demo, I still can’t get the the plugin to remove the .selected class from the current element and add it to the one being clicked.

The current result is that the items do filter, but the .selected class remains assigned to <li><a href="#videos" data-filter="*" class="selected">All</a></li>.

HTML

<ul class="category_navigation option-set" data-option-key="filter"> 
    <li><a href="#videos" data-filter="*" class="selected">All</a></li>
    <li><a href="#videos" data-filter=".feature">Feature</a></li>
    <li><a href="#videos" data-filter=".commercial">Commercial</a></li>
    <li><a href="#videos" data-filter=".music_video">Music Video</a></li>
    <li><a href="#videos" data-filter=".trailer-promo">Trailer/Promo</a></li>
    <li><a href="#videos" data-filter=".digital">Digital</a></li>
</ul>

Javascript

// cache container
var $container = $('.videos');
// initialize isotope
$container.isotope({
});

// filter items when filter link is clicked
$('[href="#videos"]').click(function(){
  var selector = $(this).attr('data-filter');
  $container.isotope({ filter: selector });
  return false;
});

Item HTML sample

<li class="trailer-promo">
    <a href='http://player.vimeo.com/video/55078437?autoplay=1' 
        class='lightview' 
        data-lightview-group='trailer/promo'
        data-lightview-type='iframe' 
        data-lightview-title="KUNG FU PANDA 2"
        data-lightview-caption="20 Intl.<br>Dir: Dreamworks/Aspect Ratio"
        data-lightview-options="width: 796, height: 447, viewport: 'scale'">
        <img src="img/video_thumbs/TRAILER_KUNG-FU-PANDA_2.jpg" alt="">
        <p>KUNG FU PANDA 2</p>
    </a>
</li>

<li class="feature">
    <a href='http://player.vimeo.com/video/16129275?autoplay=1' 
        class='lightview' 
        data-lightview-group='feature'
        data-lightview-type='iframe' 
        data-lightview-title="RAY CHARLES AMERICA"
        data-lightview-caption="Client: Tremolo Productions<br>Dir: Alexis Spraic"
        data-lightview-options="width: 796, height: 447, viewport: 'scale'">
        <img src="img/video_thumbs/FEATURE_RAY-CHARLES-AMERICA.jpg" alt="">
        <p>RAY CHARLES AMERICA</p>
    </a>
</li>

<li class="commercial">
    <a href='http://player.vimeo.com/video/28387434?autoplay=1' 
        class='lightview' 
        data-lightview-group='commercial'
        data-lightview-type='iframe' 
        data-lightview-title="VIEWDLE"
        data-lightview-caption="Third Eye<br>Dir: Blake & Nic"
        data-lightview-options="width: 796, height: 447, viewport: 'scale'">
        <img src="img/video_thumbs/COMMERCIAL_THIRD-EYE.jpg" alt="">
        <p>VIEWDLE</p>
    </a>
</li>
  • 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-16T02:25:01+00:00Added an answer on June 16, 2026 at 2:25 am

    I don’t see any code in there to actually remove the class. I don’t know anything about that plugin, but you could just do something like this:

    $(".selected").removeClass("selected"); 
    

    and add the class back to whatever element you need/want it attached to.

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

Sidebar

Related Questions

Despite setting directory permissions to 777, I still can't get a PHP script to
This one is interesting to me - despite the almost inane title. I have
I tried looking at this post which has an almost identical title but despite
Despite the numerous attempts at trying to get this to work I'm stumped. I
Despite working on EE for about 3 weeks now, believe it or not, this
This is a problem i wasn't able to solve despite extensive searches on the
I encountered an error. Despite declaring the variables (failturetext and userName) errors still appear.
Very occasionally, despite all testing efforts, I get hit with a bug report from
It goes almost without saying, this works perfectly in Chrome, Firefox, and Safari. IE
Despite much googling and hair-pulling, I can't for the life of me articulate the

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.