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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T20:11:07+00:00 2026-06-08T20:11:07+00:00

I am using quicksand to add some cool sorting to my website. http://razorjack.net/quicksand/docs-and-demos.html#examples But

  • 0

I am using quicksand to add some cool sorting to my website.

http://razorjack.net/quicksand/docs-and-demos.html#examples

But I am having an issue that when I clone my data (content) to sort, the click events get lost.

My website is andrewsimonmcallister.tv, it is the video section that I am talking about. I will try and give as much information as possible, if i am missing anthing just ask.

Here is the HTML section

<ul id="videolist">
                        <li data-id="1" data-type="tv" class="videoitem">
                            <div name="video" class="video shadow"><img src="images/video/planetoftheapemen.jpg" border=0><videotitle>TV Series : Planet of the Apemen</videotitle><p>Clip from the National TV series produced by the BBC 'Planet of the Apemen: Battle for Earth'. This is the opening scene as we sweep over the mountains and see the tribes men tracking their kill. The cue is big and sweeping to match the imagery with a ostinato combined with a sweeping string melody.</p><a href="#videoplayer" class="fancybox" name="playvideo" rel="planetoftheapemen/mountain"><div class="watch"></div></a></div>
                            <default>1</default>
                            <date>98</date>
                            <sorttype>TV</sorttype>
                        </li>
                        <li data-id="2" data-type="film" class="videoitem">
                            <div class="video"><img src="images/video/macropolisend.jpg" border=0><videotitle>Film : Macropolis</videotitle><p>Macropolis is a stop animation film produced by Flickerpix and directed by Joel Simon. In this particular scene our main protagonists finally get acceptance as a small boy buys them and takes them home. This is the final scene for the movie.</p><a href="#videoplayer" id="playvideo1" class="fancybox" rel="macropolis/ending"><div class="watch"></div></a></div>
                            <default>2</default>
                            <date>97</date>
                            <sorttype>FILM</sorttype>
                        </li>
                        <li data-id="3" data-type="scoring" class="videoitem">
                            <div class="video"><img src="images/video/orchestra.jpg" border=0><videotitle>Scoring Session : Looking Glass</videotitle><p>Live recording session for the very delicate Looking Glass cue, taken from the drama of the same name. This cue features English Horn, Harp, Piano and Strings.</p><a href="#videoplayer" id="playvideo2" class="fancybox" rel="scoring/lookingglass"><div class="watch"></div></a></div>
                            <default>3</default>
                            <date>99</date>
                            <sorttype>ZSCORING</sorttype>   
                        </li>
                        <li data-id="4" data-type="scoring" class="videoitem">
                            <div class="video"><img src="images/video/brass-section.jpg" border=0><videotitle>Scoring Session : Family Retreat</videotitle><p>Recording from a live scoring session for the title track to the movie Family Retreat. It's big, fun and light hearted.</p><a href="#videoplayer" id="playvideo3" class="fancybox" rel="scoring/familyretreat"><div class="watch"></div></a></div>
                            <default>4</default>
                            <date>100</date>
                            <sorttype>ZSCORING</sorttype>   
                        </li>
                    </ul>

On the click event for the video link, I clone the data / content

$("#open-videos").click(function(){
   console.log("Inside video");
   $(currentSection).hide();
   $("#video-player").hide();
   $("#contentbg").fadeIn();
   $("#videos").fadeIn();

   $filterType = $('input[name="type"]');
   $filterSort = $('input[name="sort"]');

   console.log("videos is " + $videos);
   if ($videos== null) {
   console.log("setting videos");
        $videos = $("#videolist");
   }

   $videosdata = $videos.clone();       
   currentSection = "#videos";
});

I have a click event on the tag on each div that basically sets which video to play before fancy box kicks in

$("a[id^='playvideo']").click(function(e){
    var videoselected = $(this).attr('rel');
    console.log("Clicked on link, rel value is " + videoselected);
    $("#jquery_jplayer_9").jPlayer({
        play: function() { // To avoid both jPlayers playing together.
            $(this).jPlayer("pauseOthers");
        },
        swfPath: "../js",
        supplied: "m4v",
        cssSelectorAncestor: "#jp_container_9"
    });

    console.log("setting media to video/" + videoselected + ".m4v");
    $("#jquery_jplayer_9").jPlayer( "setMedia", {
      m4v: "video/" + videoselected + ".m4v"
    });
    console.log("Try and play now!");

});

This event works until you click on one of the radio buttons at the top and perform a sort. Then the event gets lost.

Here is the sort code

    (function($) {
  $.fn.sorted = function(customOptions) {
    var options = {
      reversed: false,
      by: function(a) { return a.text(); }
    };
    $.extend(options, customOptions);
    $data = $(this);
    arr = $data.get();
    arr.sort(function(a, b) {
      var valA = options.by($(a));
      var valB = options.by($(b));
      if (options.reversed) {
        return (valA < valB) ? 1 : (valA > valB) ? -1 : 0;                
      } else {        
        return (valA < valB) ? -1 : (valA > valB) ? 1 : 0;    
      }
    });
    return $(arr);
  };
})(jQuery);

As you can see I have added console logging to show where things are firing so if you open up your java console you can see the a event is getting lost.

To fully demo – hit the website, click on video menu item. Then click on the first planet of the apemen video, you can see the console logging and the video will play. Then click on sort by date. Click on say macropolis, no a evets have fired this time and the video is stuck at planet of the apemen. But if you hit the website again, go into the video section and just click on each video without any sorting you can see that the <a> event always fires and it works.

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

    So I deleted the click event to set the video. Then used the title reference in fancybox tio pass the video name and changed the code there to set the video as the fancybox always opened so I knew that event was firing ok.

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

Sidebar

Related Questions

I am using the jQuery Quicksand plugin -- http://jsfiddle.net/se9pY/ but I get rawDestElement is
I'm using http://razorjack.net/quicksand/ this jquery. I want to select 'application' instead of 'everything' in
Ok so I’m using the quicksand jquery filter. now I want to add a
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I am using the Quicksand jquery scripts on an HTML page and using simple
I'm using the jQuery quicksand plugin on my site but at the moment the
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Hi I am using the jquery quicksand plugin to create a portfolio website.On each
I'm using jQuery Quicksand to create a filterable portfolio of articles: http://davekiss.com/new/ The problem
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly

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.