Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <div class="container">
  2. <span class="box">Test Test Test</span>
  3. </div>
  4.  
  5. .container {
  6. width: 200px;
  7. height: 50px;
  8. }
  9.  
  10. .box {
  11. display: inline;
  12. border: 2px solid black;
  13. }
  14.  
  15. $('.container').draggable();
  16.  
  17. $('.container').resizable({
  18. handles: 'all',
  19. resize: function(evt, ui) {
  20. var width1 = parseInt(ui.element.css('width')),
  21. height1 = parseInt(ui.element.css('height'));
  22. ui.element.css({
  23. 'font-size': (width1/10)+'px',
  24. 'line-height': (height1/10)+'px'
  25. })
  26. }
  27. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement