Create popup content using jquery
<a href="javascript:popup();" id="test-link">Open</a> function popup() { var generator=window.open('','name','height=400,width=500'); generator.document.write('<html><head><title>Popup</title>'); generator.document.write($("#test").html()); generator.document.write('</body></html>'); generator.document.close(); } You can do this using jQuery UI (dialog) (see examples in the reference documentation).
Use the jQuery UI dialog to display a popup.
For your html:
$(function() { $("#test-link").click(function() { $("#test").dialog({ resizable: true, modal: false, draggable: true }); }); }); If you do not want to use the jQuery UI dialog, you can use ThickBox .