Permalink
Browse files

Removing older files from release

  • Loading branch information...
1 parent dee7111 commit a3790e51cabb2ff46f00c27a82f621305823f6b0 @addyosmani addyosmani committed Nov 22, 2010
View
@@ -1,199 +0,0 @@
-/*
-
- jQuery UI CoverFlow 2010.
- This version by Addy Osmani
- Base code for original pre-updated plugin: Paul Baukaus
-*/
-
- $(function() {
-
-
- var defaultItem = 0;
- var listContent = "";
- var html = $('#demo-frame div.wrapper').html();
- $('#demo-frame div.wrapper').parent().append(html).end().remove();
-
-
-
- setDefault(6);
-
- //Set the default item to display on load.
- //Correct indexing
- function setDefault($n)
- {
- defaultItem = $n-1;
- }
-
-
- //Initialize CoverFlow
- $("#coverflow").coverflow({
- item: defaultItem,
- duration:1200,
- select: function(event, sky) {
- $('#slider').slider('value', sky.value);
- $('.coverflowItem').removeClass('ui-selected');
- $('.coverflowItem:eq(' + (sky.value) +')').addClass('ui-selected');
-
- }
- });
-
-
- //Initialize Slider
- $("#slider").slider({
- min: 0,
- max: $('#coverflow > *').length-1,
- value: defaultItem,
- slide: function(event, ui) {
- $('#coverflow').coverflow('select', ui.value, true);
- $('.coverflowItem').removeClass('ui-selected');
- $('.coverflowItem:eq(' + (ui.value-1) +')').addClass('ui-selected');
-
- }
- });
-
-
- //Skip to an item in the CoverFlow
- function skipTo($itemNumber)
- {
- $("#slider").slider( "option", "value", $itemNumber);
- $('#coverflow').coverflow('select', $itemNumber, true);
- $('.coverflowItem').removeClass('ui-selected');
- $('.coverflowItem:eq(' + ($itemNumber) +')').addClass('ui-selected');
- }
-
-
-
- //Generate the text-list of items below the coverflow images.
- $('#coverflow img').each(function(index, value)
- {
- $artist = $(this).data('artist');
- $album = $(this).data('album');
-
- try
- {
- listContent += "<li class='ui-state-default coverflowItem' data-itemlink='"
- + (index) +"'>" + $artist + " - " + $album +"</li>";
- }
- catch(e)
- {
- }
- });
-
- $('#sortable').html(listContent);
- $('.coverflowItem:eq(' + (defaultItem) +')').addClass('ui-selected');
-
- //Assign click event for coverflow images
- $('body').delegate('.coverflowItem','click', function()
- {
- skipTo($(this).data('itemlink'));
- });
-
-
-
- //Handle keyboard events
- $(document).keypress(function(e)
- {
- $current = $('#slider').slider('value');
-
- switch(e.keyCode)
- {
- case 38:
- if($current > 0)
- {
- $current= $current-1;
- skipTo($current);
- }
- break;
-
- case 40:
-
- if($current < $('#coverflow > *').length-1)
- {
- $current = $current+1;
- skipTo($current);
- }
- break;
- }
-
- });
-
-
-
- //change the main div to overflow-hidden as we can use the slider now
- $("#scroll-pane").css('overflow','hidden');
-
- //calculate the height that the scrollbar handle should be
- var difference = $("#sortable").height()-$("#scroll-pane").height();//eg it's 200px longer
- var proportion = difference / $("#sortable").height();//eg 200px/500px
- var handleHeight = Math.round((1-proportion)*$("#scroll-pane").height());//set the proportional height
-
- //set up the slider
- $("#slider-vertical").slider({
- orientation: "vertical",
- range: "max",
- min: 0,
- max: 100,
- value: 100,
- slide: function(event, ui) {
- var topValue = -((100-ui.value)*difference/100);
- $("#sortable").css({top:topValue});//move the top up (negative value) by the percentage the slider has been moved times the difference in height
- }
- });
-
-
- var origSliderHeight = $("#slider-vertical").height();//read the original slider height
- var sliderHeight = origSliderHeight - handleHeight ;//the height through which the handle can move needs to be the original height minus the handle height
- var sliderMargin = (origSliderHeight - sliderHeight)*0.5;//so the slider needs to have both top and bottom margins equal to half the difference
-
-
-//mousewheel support
-
- $(document).mousewheel(function(event, delta){
-
- var speed = 1;
- var sliderVal = $("#slider").slider("value");//read current value of the slider
- var coverflowItem = 0;
- var cflowlength = $('#coverflow > *').length-1;
-
-
-
- if(delta > 0 && sliderVal > 0)
- {
-
- sliderVal -=1;
-
- }else{
-
- if(delta < 0)
- {
- sliderVal +=1;
- }
-
- }
-
-
- var leftValue = -((100-sliderVal)*difference/100);//calculate the content top from the slider position
-
- if (leftValue>0) leftValue = 0;//stop the content scrolling down too much
- if (Math.abs(leftValue)>difference) leftValue = (-1)*difference;//stop the content scrolling up too much
-
- coverflowItem = Math.floor(sliderVal);
- skipTo(coverflowItem);
-
-
-
- event.preventDefault();//stop any default behaviour
- });
-
- //mousewheel
-
-});
-
-$(function(){
-
-//custom-scrollpanes from ui.
-
-
-
-
-});
View
@@ -1,127 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
- <title>jQuery UI CoverFlow II | Addy Osmani</title>
- <link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7/themes/ui-darkness/ui.all.css" rel="Stylesheet" />
- <script type="text/javascript" src="../external/jquery-1.4.3.min.js"></script>
- <script type="text/javascript" src="../external/ui.core.js"></script>
- <script type="text/javascript" src="../external/ui.slider.js"></script>
- <script type="text/javascript" src="../ui.coverflow.js"></script>
- <script type="text/javascript" src="../reflection.js"></script>
- <link type="text/css" href="demos.css" rel="stylesheet" />
-
- <!-- Transformie is a plugin that makes webkit's CSS transforms work in Internet Explorer (download at http://paulbakaus.com/projects) -->
- <script src="../external/sylvester.js" type="text/javascript"></script>
- <script src="../external/transformie.js" type="text/javascript"></script>
-
- <style type="text/css">
-
- body { background-color:#000;}
-
- #coverflow {
- height: 300px; width: 2600px; padding: 42px;
- position: absolute; top: 0px; left: 0px;
- margin-top:50px;
- }
-
- #coverflow img {
- width: 260px; height: 260px;
- float: left; position: relative; margin: -35px;
-
-
- }
-
- div.wrapper {
- height: 390px; width: 600px; padding: 10px;
- overflow: hidden; position: relative; margin:0 auto;
- background-color:#000;
- }
-
- #demo-frame {
- overflow: hidden;
- }
-
- #slider {
- margin-top: 380px;
- }
-
- #sortable {
- list-style-type:none;margin:0 auto;padding:0;width:100%;
-
- }
- #sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
- #sortable li span { position: absolute; margin-left: -1.3em; }
- .ui-selected { background: #F39814; color: white; }
- .pageWrapper { margin:0 auto; width:960px}
-
-
-
-
-
-/* css for scrollbar below here*/
-#scroll-pane { float:left;overflow: auto; width: 620px; height:300px;position:relative;margin-left:50px;margin-bottom:25px;display:inline}
-#sortable {position:absolute;top:0;left:0}
-.scroll-content-item {background-color:#fcfcfc;color:#003366;width:100px;height:100px;float:left;margin:10px;font-size:3em;line-height:96px;text-align:center;border:1px solid gray;display:inline;}
-#slider-wrap{float:left;background-color:lightgrey;height:300px;width:20px;border:1px solid gray;border-left:none;}
-#slider-vertical{margin-left:5px;position:relative;height:100%}
-.ui-slider-handle{width:20px;height:10px;margin-left:5px;background-color:darkgray;display:block;position:absolute}
-
-.listholder { width:750px; margin:0 auto;}
-
- </style>
-
- <script src="jquery.mousewheel.min.js" type="text/javascript"></script>
-
- <script src="app.js" type="text/javascript"></script>
-
-
-</head>
-<body>
-
-
-<div class="pageWrapper">
-<div class="demo">
-
- <div class="wrapper">
- <div id="coverflow">
- <img src="images/gorillaz-plasticbeach.jpg" data-artist="Gorillaz" data-album="Plastic Beach"/>
- <img src="images/weezer-hurley.jpg" data-artist="Weezer" data-album="Hurley"/>
- <img src="images/kingsofleon-comearoundsunshine.jpg" data-artist="Kings Of Leon" data-album="Come Around Sunshine"/>
- <img src="images/kidrock-bornfree.jpg" data-artist="Kid Rock" data-album="Born Free"/>
- <img src="images/lilwayne-iamnotahumanbeing.jpg" data-artist="Lil Wayne" data-album="I Am Not A Human Being"/>
- <img src="images/taylorswift-speaknow.jpg" data-artist="Taylor Swift" data-album="Speak Now"/>
- <img src="images/thebandperry-thebandperry.jpg" data-artist="The Band Perry" data-album="The Band Perry"/>
- <img src="images/recovery-recovery.jpg" data-artist="Eminem" data-album="Recovery"/>
- <img src="images/maroon5-handsallover.jpg" data-artist="Maroon 5" data-album="Hands All Over"/>
- <img src="images/mychemicalromance-dangerdays.jpg" data-artist="My Chemical Romance" data-album="Danger Days"/>
- <img src="images/order of the black - black label society.jpg" data-artist="Order Of The Black" data-album="Black Label Society"/>
- <img src="images/ironmaiden-thefinalfrontier.jpg" data-artist="Iron Maiden" data-album="The Final Frontier"/>
- <img src="images/usher-raymondvraymond.jpg" data-artist="Usher" data-album="Raymond V Raymond"/>
- </div>
- <div id='slider'></div>
- </div>
-
-</div>
-
-<div class="demo-description">
-</div>
-
-<div class="listholder">
-
-<div id="scroll-pane">
- <ul id="sortable">
- </ul>
-</div>
-
-<div id="slider-wrap"><div id="slider-vertical"></div></div>
-
-</div>
-
-
-
-</div>
-
-
-
-</body>
-</html>
@@ -1,11 +0,0 @@
-/* Copyright (c) 2009 Brandon Aaron (http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
- * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
- *
- * Version: 3.0.2
- *
- * Requires: 1.2.2+
- */
-(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery);
@@ -1,27 +0,0 @@
-
-
-
- $(document).keypress(function(e)
- {
- $current = $('#slider').slider('value');
- switch(e.keyCode)
- {
- case 38:
- if($current > 0)
- {
- $current= $current-1;
- skipTo($current);
- }
- break;
-
- case 40:
-
- if($current < $('#coverflow > *').length-1)
- {
- $current = $current+1;
- skipTo($current);
- }
- break;
- }
- });
-
Oops, something went wrong.

0 comments on commit a3790e5

Please sign in to comment.