Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: gh-pages
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (58 sloc) 1.869 kB
<!DOCTYPE html>
<html>
<head>
<title>jQuery Zoom Plugin</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="jquery.gangZoom.js"></script>
<script>
var startTime = 1296941039;
var endTime = 1296944639;
$(function () {
$(".zoomable").gangZoom({
startTime: startTime,
endTime: endTime,
paddingLeft: 67,
paddingRight: 30,
paddingTop: 32,
paddingBottom: 43,
done: function (startTime, endTime) {
setStartAndEnd(startTime, endTime);
//document.forms['ganglia_form'].submit();
},
cancel: function (startTime, endTime) {
setStartAndEnd(startTime, endTime);
}
});
function setStartAndEnd(_startTime, _endTime) {
startTime = _startTime;
endTime = _endTime;
}
});
</script>
<script>
$(function () {
setInterval(function () {
$.each(["start", "end"], function (i, kind) {
var ts = window[kind + "Time"];
$("#" + kind + " input").val(ts);
$("#" + kind + " span").html(new Date(ts * 1000) + "");
});
}, 100);
});
</script>
</head>
<body>
Click and drag to select a time range.
<div id="start">
<label for="datepicker-cs">Start Time</label>
<input type="text" id="datepicker-cs">
<span class="human"></span>
</div>
<div id="end">
<label for="datepicker-ce">End Time</label>
<input type="text" id="datepicker-ce">
<span class="human"></span>
</div>
<a href="test.html" onclick="alert('foo'); return false;"><img class="zoomable" src="http://cl.ly/1s1C0m1E0m45353i0u41/content"></img></a>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.