init
This commit is contained in:
parent
06f61d8ce8
commit
f301cb744d
2271 changed files with 103162 additions and 0 deletions
32
02-ui/05-widgets/06-widget-tasks/03-resize-img/task/index.html
Executable file
32
02-ui/05-widgets/06-widget-tasks/03-resize-img/task/index.html
Executable file
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<script src="http://code.jquery.com/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<img style="width:500px;height:282px" id="heroes" src="http://js.cx/clipart/heroes.jpg">
|
||||
|
||||
Картинка для декорации правого-нижнего угла: <img src="http://js.cx/clipart/handle-se.png">
|
||||
|
||||
<div id="info"></div>
|
||||
|
||||
<script>
|
||||
function Resizeable(options) {
|
||||
/* ваш код */
|
||||
}
|
||||
|
||||
var resizeMe = new Resizeable({
|
||||
elem: $('#heroes')
|
||||
});
|
||||
|
||||
$(resizeMe).on("resize", function(e) {
|
||||
// вывести результат
|
||||
$('#info').html("ширина:" + e.newWidth + ", высота:" + e.newHeight);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue