This commit is contained in:
Ilya Kantor 2014-10-26 22:10:13 +03:00
parent 06f61d8ce8
commit f301cb744d
2271 changed files with 103162 additions and 0 deletions

View file

@ -0,0 +1 @@
{"name":"resizeable-src","plunk":"SMRJLzwRlYukmKwOxQWW"}

View 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>