added autoresize option and updated documentation
This commit is contained in:
parent
e8a0bfe5be
commit
2edf130472
4 changed files with 25 additions and 14 deletions
11
index.html
11
index.html
|
@ -57,17 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
language: 'de_CH',
|
||||
controls: true
|
||||
});
|
||||
$(window).on('resize', function (event) {
|
||||
var $uhr = $('#uhr');
|
||||
var $parent = $uhr.parent();
|
||||
var $window = $(window);
|
||||
var parentWidth = $parent.width();
|
||||
var parentHeight = $parent.height();
|
||||
var windowWidth = $window.width();
|
||||
var windowHeight = $window.height();
|
||||
var size = Math.min(parentWidth, parentHeight, windowWidth, windowHeight) + 'px';
|
||||
$uhr.uhr("width", size);
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue