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

  • Home
  • SEARCH
  • 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 9093641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T23:09:15+00:00 2026-06-16T23:09:15+00:00

Need help with this one, been cracking my head for days to get it

  • 0

Need help with this one, been cracking my head for days to get it work.

Referring to this demo http://jsfiddle.net/8QkEw/313/, how do I modify my code to enable inner hyperlinks to work while expanded/selected itemSelector stay expanded/selected.

$(function(){


  var $container = $('#container'),
      $items = $('.item');

  $container.isotope({
    itemSelector: '.item',
    masonry: {
      columnWidth: 100
    },
    getSortData : {
      selected : function( $item ){
        // sort by selected first, then by original order
        return ($item.hasClass('selected') ? -500 : 0 ) + $item.index();
      }
    },
    sortBy : 'selected'
  })

  $items.click(function(){
    var $this = $(this);
    // don't proceed if already selected
    var $previousSelected = $('.selected');
    if ( !$this.hasClass('selected') ) {
      $this.addClass('selected');
    }

    $previousSelected.removeClass('selected');

    // update sortData for new items size
    $container
      .isotope( 'updateSortData', $this )
      .isotope( 'updateSortData', $previousSelected )
      .isotope();

  });

});

It is only when users click on inner hyperlink will NOT minimize the expanded/selected box; clicking other area will still trigger $previousSelected.removeClass('selected');

Thanks in advance.

  • 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-16T23:09:16+00:00Added an answer on June 16, 2026 at 11:09 pm

    Stop event propagation on the links:

    $('.item a').click(function(event){
        event.stopPropagation();
    });
    

    Here is a demonstration: http://jsfiddle.net/VCmNU/

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

Sidebar

Related Questions

guys i really REALLY need some help on this one. 2 days i've been
I really need help on this one. I am having a simple login form
I need your help with this one again. I want to send special characters
We Really need some help on this one: We've Struggled with all the Apple
Okay, I need help. I'm usually pretty good at SQL queries but this one
I need a regex expert to help out on this one. Examples I've found
I need help with one ajax function This is raw page setup. Page will
Been trying this for quite a while now and I need help. Basically I
I've been stuck on this for about 2 weeks. I need help in the
I've been struggling with this one for a few days now (but that's only

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.