added autoresize option and updated documentation

This commit is contained in:
Manuel Friedli 2014-08-12 19:19:37 +02:00
parent e8a0bfe5be
commit 2edf130472
4 changed files with 25 additions and 14 deletions

View file

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