mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
demo: #3185
This commit is contained in:
parent
dab4c2b564
commit
4f55751d8a
BIN
demos/real-world/photo-manager/img/slider-bg-2.png
Normal file
BIN
demos/real-world/photo-manager/img/slider-bg-2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 B |
BIN
demos/real-world/photo-manager/img/slider-handle.gif
Normal file
BIN
demos/real-world/photo-manager/img/slider-handle.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 176 B |
@ -15,9 +15,20 @@
|
|||||||
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
|
<script type="text/javascript" src="../../../ui/ui.core.js"></script>
|
||||||
<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
|
<script type="text/javascript" src="../../../ui/ui.draggable.js"></script>
|
||||||
<script type="text/javascript" src="../../../ui/ui.droppable.js"></script>
|
<script type="text/javascript" src="../../../ui/ui.droppable.js"></script>
|
||||||
|
<script type="text/javascript" src="../../../ui/ui.slider.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="./js/demo.js"></script>
|
<script type="text/javascript" src="./js/demo.js"></script>
|
||||||
|
<style type="text/css" media="all">
|
||||||
|
.ui-slider { width: 200px; height: 23px; position: relative; background-repeat: no-repeat; background-position: center center; }
|
||||||
|
.ui-slider-handle { position: absolute; z-index: 1; height: 23px; width: 12px; top: 0px; left: 0px; background-image: url(img/slider-handle.gif); }
|
||||||
|
.ui-slider-handle-active { border: 1px dotted black; }
|
||||||
|
.ui-slider-disabled .ui-slider-handle { opacity: 0.5; filter: alpha(opacity=50); }
|
||||||
|
.ui-slider-range { position: absolute; background: #50A029; opacity: 0.3; filter: alpha(opacity=30); width: 100%; height: 100%; }
|
||||||
|
|
||||||
|
.ui-slider, .ui-slider-1 { background-image: url(img/slider-bg-1.png); }
|
||||||
|
.ui-slider-2 { background-image: url(img/slider-bg-2.png); clear:both}
|
||||||
|
.nominheight{min-height:20px;}
|
||||||
|
</style>
|
||||||
<link rel="stylesheet" type="text/css" href="./theme/css/screen.css" media="screen, projection" />
|
<link rel="stylesheet" type="text/css" href="./theme/css/screen.css" media="screen, projection" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -109,6 +120,14 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div id="sidebar">
|
<div id="sidebar">
|
||||||
|
<div class="box2" id="resize">
|
||||||
|
<h2>Resize images</h2>
|
||||||
|
<div style="margin: 5px; padding: 5px;min-height:20px" class="ui-slider-2 ui-slider" id="sliderSize">
|
||||||
|
<a style="cursor: default;" href="javascript:void(0)">
|
||||||
|
<div class="ui-slider-handle" style="left: 150px;min-height:20px"></div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="box" id="trash">
|
<div class="box" id="trash">
|
||||||
<h2>Trash (drag me back)</h2>
|
<h2>Trash (drag me back)</h2>
|
||||||
<div></div>
|
<div></div>
|
||||||
|
@ -117,6 +117,26 @@ $(window).bind('load', function() {
|
|||||||
.displayBox();
|
.displayBox();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var sliderChange = function(e, ui){
|
||||||
|
$('.img_content').each(function(index, item){
|
||||||
|
var _new = 1.44 * $('#sliderSize').slider("value");
|
||||||
|
|
||||||
|
$(this).css("width", _new+'px')
|
||||||
|
.parent().css("width", (_new+16)+'px');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
$('#sliderSize').slider({
|
||||||
|
startValue : 100,
|
||||||
|
min : 50,
|
||||||
|
max : 100,
|
||||||
|
stepping : 5,
|
||||||
|
slide : sliderChange,
|
||||||
|
change : sliderChange
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function createGalleryItem(img) {
|
function createGalleryItem(img) {
|
||||||
|
@ -116,12 +116,12 @@ h1 {
|
|||||||
----------------
|
----------------
|
||||||
=SIDEBAR
|
=SIDEBAR
|
||||||
---------------- */
|
---------------- */
|
||||||
.box {
|
.box, .box2 {
|
||||||
margin: 18px;
|
margin: 18px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
.box h2 {
|
.box h2, .box2 h2 {
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
Loading…
Reference in New Issue
Block a user