jquery-onresize
jQuery UI widget enabling cross browser resize events on regular (non-void) elements, without using iframes or timers.
Last updated 5 years ago by bluejeansandrain .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install jquery-onresize 
SYNC missed versions from official npm registry.

jQuery UI onresize widget

jQuery UI widget enabling cross browser resize events on regular (non-void) elements, without using iframes or timers.

Tested in Chrome, Firefox, Safari, Opera, and Internet Explorer 9+.

Try it in jsFiddle

Download

Example

<head>
	<script src="jquery.js"></script>
	<script src="jquery-ui.js"></script>
	<script src="jquery.onresize.js"></script>
	<script>
	$(function() {
		$('#myElement').onresize(function(e) {
			console.log('width: %s, height: %s', $(this).width(), $(this).height());
		});

		// Alternatively...
		$('#myElement').onresize().on('resize', function(e) {
			console.log('width: %s, height: %s', $(this).width(), $(this).height());
		});

		$('#myElement').css({
			height: '20px',
			width: '20px'
		});
	});
	</script>
</head>
<body>
	<div id="myElement"></div>
</body>

Current Tags

  • 1.0.5                                ...           latest (5 years ago)

2 Versions

  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |