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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:53:38+00:00 2026-06-07T05:53:38+00:00

Hi I am using the jquery quicksand plugin to create a portfolio website.On each

  • 0

Hi I am using the jquery quicksand plugin to create a portfolio website.On each image that I have I am trying to create a hover effect with jQuery.The effect works at first but after I click the buttons that are atached to the quicksand plugin the hover effect doesn’t work anymore.I noticed this hapening before when I create a new element and insert it into the DOM the click handler doesn’t get attached to it.

How can I solve this problem?

This is the code for both the quicksand blugin and the hover effect:

 $(document).ready(function() {

  var $filterType = $('#filterOptions li.active a').attr('class');
  var $holder = $('ul.ourHolder')
  var $data = $holder.clone();

  $('#filterOptions li a').click(function(e) {
    $('#filterOptions li').removeClass('active');

    var $filterType = $(this).attr('class');
    $(this).parent().addClass('active');
    if ($filterType == 'all') {
      var $filteredData = $data.find('li');
    }
    else {
      var $filteredData = $data.find('li[data-type=' + $filterType + ']');
    } 
    $holder.quicksand($filteredData, {
      duration: 800,
      easing: 'easeInOutQuad'
    });
    return false;
  });

   //hover effect
    var portfolio =  $("ul.ourHolder li");
    portfolio.on('mouseover', function(){
        $(this).children('div.full').stop().fadeTo('slow',0.5);     
    }) 
    portfolio.on('mouseout' , function(){
        $(this).children('div.full').stop().fadeOut();
    })
});
  • 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-07T05:53:39+00:00Added an answer on June 7, 2026 at 5:53 am

    That particular usage of .on() only binds event handlers to elements that existed when the code was run, and won’t affect elements that are added dynamically after that code has been executed. Instead you’ll need to use the event delegation syntax for .on(), something like this:

    $(document).on('mouseover', 'ul.ourHolder li', function(){
        $(this).children('div.full').stop().fadeTo('slow',0.5);     
    }) 
    

    Ideally you’d replace document with a selector for a more specific, but not dynamically added, element that contains all of the elements you want to execute the callback function for when they trigger the mouseover event.

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

Sidebar

Related Questions

Using jQuery version 1.4.2 and Validation plugin version 1.8.1 I have a textbox that
I'm using jQuery Quicksand to create a filterable portfolio of articles: http://davekiss.com/new/ The problem
Using jquery I have a clicking tab mechanism that are nothing but anchor tags
I am using this example of quicksand jQuery. Making a Beautiful HTML5 Portfolio Now,
Using jQuery 1.7.1, I'm trying to create an event handler for the change event
I am using the jQuery Quicksand plugin -- http://jsfiddle.net/se9pY/ but I get rawDestElement is
Using jQuery UI , I have a tabs plugin and within tab 1 gets
Using jQuery validation plugin but it has no CSV validation. I have made an
I'm using the jQuery Quicksand plugin to filter a list by dates. I've got
Using jQuery the jquery plugin along with the easing plugin. I have a series

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.