content top
Google Buzz

cFlow – Coverflow for jQuery (Experimental Release)

 jQuery Coverflow

 

Update: This component has been replaced by the more accurate and up to date CoverFlow demo I recently did for Firefox 3/3.5. You may find that article here.

This post will provide you with a free open-source Coverflow implementation in jQuery. As you can see from above, this is flat version of the effect that renders fine in Firefox and Safari but I am hoping to take a look at adding a better "3D stacked view" at some point in the future (something similar to what the Flash Coverflow effect provides would be amazing). I see the component coming in useful for displaying everything from personal photos to the top 20 albums you love, but it’s flexible enough to be modified to fit your own needs.

I wish I could say this was a perfect component release but as things have been getting a lot busier lately, I haven’t had a chance to properly work out all the kinks with the component or fix rendering for IE. If you get a chance to make any improvements to the code please feel free to post about them here and we can all work towards getting this to the level where it can be used in production systems. 


Demo Source

Edit: I am strongly considering moving away from the current reflection plugin being used in this demo to Reflex 1.1 which supports angular views much better. That project aims to provide only the rendering capabilities for each stack item so perhaps marrying the two together would result in exactly what we’re looking for. Will keep you all posted.

 

Bookmark and Share
Share

Related posts:

  1. Minibox – a compact jQuery Slideshow component (experimental release) Today I’ve been working on a compact slideshow component...
  2. Open-Source JavaScript CoverFlow     Hi guys. I’m making some more of my...
  3. An improved Javascript CoverFlow demo using Canvas and HTML5 (Firefox only)   Over the past 2 weeks I’ve done a lot...
  4. jQuery UI Animation Effects The jQuery UI Effects Core brings a few more...
  5. New release: The 820 byte compact jQuery Slideshow component   One of the great things about working with jQuery...

Related posts brought to you by Yet Another Related Posts Plugin.

15 Comments »

  1. avatar
    Francesco Aloisio Says:
    June 2nd, 2009 at 3:34 pm
    comment-top

    That’s Pretty cool! I may consider using it on my company website, is there any restriction for commercial usage? nice job….

    comment-bottom
  2. avatar comment-top

    Please, feel free to use it! :) I only ask that if you manage to get some additional fixes done on the IE CSS you might consider sharing them here for other developers to take a look at. Thanks for the comment!

    comment-bottom
  3. avatar
    Francesco Aloisio Says:
    June 3rd, 2009 at 9:11 am
    comment-top

    Hi there, I would be happy to get some fixes done on IE indeed, but it seems like the download source code button is broken. I’ll try to steal it from the demo page. Cheers…

    comment-bottom
  4. avatar comment-top

    The only thing im not getting is the basis for your position calculations. When not using reflections, all the top/left positions are set to the tag itself. And that results in erroneus scaling of the image.
    I tried to dive in to your code and figure out by what are those calculations made but they seem to be random, trial and error like for your specific images :)

    comment-bottom
  5. avatar comment-top

    Hi there. My apologies if the server was having issues earlier. Here’s a direct link to the source code: Download

    comment-bottom
  6. avatar comment-top

    I’d love to see this working in IE and from the looks of it, Reflex would be a good way to go. Great work, would kill to see it working in IE.

    comment-bottom
  7. avatar comment-top

    To make it working under IE (at least 7), just change the following lines (L7-10):
    var top = offsets[1];
    var left = offsets[0];
    var width = element.clientWidth;
    var height = element.clientHeight;

    with that :
    var top = offsets[1] ? offsets[1]: 0;
    var left = offsets[0] ? offsets[0]: 0;
    var width = $(element).innerWidth();
    var height = $(element).innerHeight();

    To make the slider compliant with JQueryUI 1.7.1, changes lines 78-80 with the following :
    min: 0,
    max: this.getStackCount() – 1,
    value: this.getCurrentPos(),

    Rgds,

    \-\.

    comment-bottom
  8. avatar comment-top

    To make it working under IE (at least 7), just change the following lines (L7-10):
    var top = offsets[1];
    var left = offsets[0];
    var width = element.clientWidth;
    var height = element.clientHeight;

    with that :
    var top = offsets[1] ? offsets[1]: 0;
    var left = offsets[0] ? offsets[0]: 0;
    var width = $(element).innerWidth();
    var height = $(element).innerHeight();

    To make the slider compliant with JQueryUI 1.7.1, changes lines 78-80 with the following :
    min: 0,
    max: this.getStackCount() – 1,
    value: this.getCurrentPos(),

    Rgds,

    “-”.

    comment-bottom
  9. avatar comment-top

    i make those changes in the jquery-cflow.js file and yet having problems with IE 7 (reflection works fine) but coverflow is not moving :S

    comment-bottom
  10. avatar comment-top

    Hi Adnan,
    I have compared the functionality of this and the newer release and I think you should rather concentrate on making it work on all browsers for a while. Even Opera10beta doesn’t support it.
    A small suggestion without looking into code:
    to fix the transparency issue could you place a black object with 100 opacity below the cover reflection?

    Also the scroll bar is not positioned right.. Well.. it’s too far to the right :)
    Hope it gives you some ideas

    comment-bottom
  11. avatar comment-top

    Hi Rav3n
    Thanks for the suggestions! At the moment the reason I’ve opted to go for experimental releases for single browsers (rather than a cross-browser solution) is because I’m researching the best way to first replicate all the functionality found in the CoverFlow component you can see in iTunes. This particular release was missing angles, perspectives and a proper “stack” appearance which is why I chose to create a better version using the Canvas component (see the most recent posts for this). Although it currently only works in Firefox I hope to expand on this so that the control works using SVG for IE and in other browsers (such as Opera, Safari etc.) too.

    comment-bottom
  12. avatar
    Dimitar Haralanov Says:
    July 31st, 2009 at 5:21 pm
    comment-top

    The problem with the JS code not working in IE comes from the wrong .offset() call that you make. Wrong for IE. Instead of using

    var top = offsets[1];
    var left = offsets[0];

    change that to

    var top_ = offsets[1] || offsets.top;
    var left_ = offsets[0] || offsets.left;

    As well as the the width and height variable statements. There are some other problems with object property declarations. I will upload the modified file later on so that you guys can use it.

    comment-bottom
  13. avatar comment-top

    Nice work!
    The IE changes proposed by \-\ works fine for me. Thanks!

    comment-bottom
  14. avatar comment-top

    hi there.

    first of all… thx for the great plugin.

    but i have a little problem. if i click on the knob of the silder there will be tree blue pixel on the left side near the caption text. why?

    comment-bottom
  15. avatar comment-top

    I made the changes to cflow.js from the suggestion made by (”-”) and the coverflow works. The slider bar doesn’t. Anyone got this to work?

    Also i noticed the mouse doesn’t work?

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment