Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="container">
- <span class="box">Test Test Test</span>
- </div>
- .container {
- width: 200px;
- height: 50px;
- }
- .box {
- display: inline;
- border: 2px solid black;
- }
- $('.container').draggable();
- $('.container').resizable({
- handles: 'all',
- resize: function(evt, ui) {
- var width1 = parseInt(ui.element.css('width')),
- height1 = parseInt(ui.element.css('height'));
- ui.element.css({
- 'font-size': (width1/10)+'px',
- 'line-height': (height1/10)+'px'
- })
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement