jQuery(document).ready(function($) { var $el = $("#very-specific-design"); var elHeight = $el.outerHeight(); var elWidth = $el.outerWidth(); var $wrapper = $("#scaleable-wrapper"); $wrapper.resizable({ resize: doResize }); function doResize(event, ui) { var scale, origin; scale = Math.min( ui.size.width / elWidth, ui.size.height / elHeight ); $el.css({ transform: "translate(-50%, -50%) " + "scale(" + scale + ")" }); } var starterData = { size: { width: $wrapper.width(), height: $wrapper.height() } } doResize(null, starterData); }); });

Tag: cinnamon rolls

Cinnamon Rolls

From WHITE LILY Makes 30 cinnamon rolls A warm and gooey breakfast favorite…perfect for Christmas morning with the family. INGREDIENTS ROLLS 2 packages active dry

Read More »