2013-04-06 79 views
1

我有一个可拖动的jQuery的弹出窗口,现在它显示了其body.But里面我想加载弹出我怎么能做到这一点可拖动jQuery的弹出窗口

这里里面的html页面的消息是的截屏我的弹出

enter image description here

这里是我的代码 popup.php

<!DOCTYPE html> 
<html> 
<head> 
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> 
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> 
    <style type="text/css"> 
     #draggable { width: 200px; height: 250px; background: silver; } 
    </style> 
    <script> 
     $(document).ready(function() { 
      $("#draggable").draggable(); 
     }); 
    </script> 
</head> 
<body style="font-size:75%;"> 

    <div id="draggable">Drag me</div> 

</body> 
</html> 

请帮我,谢谢

回答

0

尝试用​​使用,并使其.draggable()太:

$(document).ready(function() { 
    $("#draggable").load('yourtargetpage.php').draggable(); 
}); 
0

只需使用load

$('#draggable').load('filetoload.html');