Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 7th, 2012  |  syntax: None  |  size: 0.73 KB  |  hits: 4  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Jquery Append div and then make it resizable and draggable?
  2. function open_import_window(){
  3. $('body').append('<div id="msg_bg"></div>');
  4. $('body').append('<div id="import_box" class="import_box"><div class="title_bar">Import</div><div id="content_import_box"></div></div>');
  5. $('#import_box').draggable({handle:".title_bar"}).resizable();
  6. var window_width = $(window).innerWidth();
  7. var import_box_left = (window_width/2)-400;
  8. $("#import_box").css("left", import_box_left);
  9.  
  10. var window_height = $(window).innerHeight();
  11. var import_box_top = (window_height/2)-250;
  12. $("#import_box").css("top", import_box_top);
  13.  
  14. $.ajax({
  15.     url: 'import.php',
  16.     success: function(data) {
  17.         $('#content_import_box').html(data);
  18.         resize();
  19.     }
  20. });
  21. }