update YUI to 2.8.0r4
This commit is contained in:
parent
27f474ec64
commit
2d28e0c0ba
2007 changed files with 344487 additions and 210070 deletions
|
|
@ -1,6 +1,8 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
<title>Spotlight example</title>
|
||||
|
||||
|
|
@ -19,12 +21,16 @@ body {
|
|||
<link rel="stylesheet" type="text/css" href="../../build/fonts/fonts-min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../build/carousel/assets/skins/sam/carousel.css" />
|
||||
<script type="text/javascript" src="../../build/yahoo-dom-event/yahoo-dom-event.js"></script>
|
||||
<script type="text/javascript" src="../../build/element/element-beta-min.js"></script>
|
||||
<script type="text/javascript" src="../../build/carousel/carousel-beta-min.js"></script>
|
||||
<script type="text/javascript" src="../../build/element/element-min.js"></script>
|
||||
<script type="text/javascript" src="../../build/carousel/carousel-min.js"></script>
|
||||
|
||||
|
||||
<!--begin custom header content for this example-->
|
||||
<style type="text/css">
|
||||
#container {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Style the spotlight container */
|
||||
#spotlight {
|
||||
border: 1px solid #ccc;
|
||||
|
|
@ -33,23 +39,17 @@ body {
|
|||
padding: 1px;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
#container {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Always be sure to give your carousel items a width and a height */
|
||||
.yui-carousel-element li {
|
||||
height: 75px;
|
||||
opacity: 0.6;
|
||||
width: 75px;
|
||||
}
|
||||
|
||||
.yui-carousel-element .yui-carousel-item-selected {
|
||||
opacity: 1;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.yui-skin-sam .yui-carousel-nav ul li {
|
||||
margin: 0;
|
||||
.yui-carousel-element .yui-carousel-item-selected {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ body {
|
|||
|
||||
</head>
|
||||
|
||||
<body class=" yui-skin-sam">
|
||||
<body class="yui-skin-sam">
|
||||
|
||||
|
||||
<h1>Spotlight example</h1>
|
||||
|
|
@ -115,29 +115,8 @@ body {
|
|||
</div>
|
||||
<!-- The spotlight container -->
|
||||
<div id="spotlight"></div>
|
||||
|
||||
<style type="text/css">
|
||||
/* Style the spotlight container */
|
||||
#spotlight {
|
||||
border: 1px solid #ccc;
|
||||
height: 180px;
|
||||
margin: 10px auto;
|
||||
padding: 1px;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.yui-carousel-element li {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.yui-carousel-element .yui-carousel-item-selected {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
(function () {
|
||||
var carousel;
|
||||
|
||||
// Get the image link from within its (parent) container.
|
||||
function getImage(parent) {
|
||||
var el = parent.firstChild;
|
||||
|
|
@ -155,27 +134,20 @@ body {
|
|||
}
|
||||
|
||||
YAHOO.util.Event.onDOMReady(function (ev) {
|
||||
var el, item,
|
||||
spotlight = YAHOO.util.Dom.get("spotlight"),
|
||||
var spotlight = YAHOO.util.Dom.get("spotlight"),
|
||||
carousel = new YAHOO.widget.Carousel("container");
|
||||
|
||||
carousel.render(); // get ready for rendering the widget
|
||||
carousel.show(); // display the widget
|
||||
|
||||
// display the first selected item in the spotlight
|
||||
item = carousel.getElementForItem(carousel.get("selectedItem"));
|
||||
if (item) {
|
||||
spotlight.innerHTML = "<img src=\"" + getImage(item) + "\">";
|
||||
}
|
||||
|
||||
carousel.on("itemSelected", function (index) {
|
||||
// item has the reference to the Carousel's item
|
||||
item = carousel.getElementForItem(index);
|
||||
var item = carousel.getElementForItem(index);
|
||||
|
||||
if (item) {
|
||||
spotlight.innerHTML = "<img src=\""+getImage(item)+"\">";
|
||||
}
|
||||
});
|
||||
|
||||
carousel.render(); // get ready for rendering the widget
|
||||
carousel.show(); // display the widget
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue