javascript - jquery: On loading dialog from another page & adding it to a DIV, i need only the dialog area to be added? -


i'm loading dialog page using load. i'm trying load inside div. need dialog box area added inside div , not entire blank space present in page load dialog. how can done ?

$(document).ready(function(e) {     $('#content').load('dialog.html'); }); 

html

<div id="content">  </div> 

dialog.html

$(document).ready(function(e) {     $('#wrapper').dialog({         appendto:'#content'     }); });  <body>     <div id="wrapper">     </div> </body> 

i tried load('dialog.html div') , still blank space gets added !

you may try this:

$(document).ready(function(e) {      // initialize dialog     var dialog1 = $("#content").dialog({                        autoopen: false                   });      // load content , open dialog     dialog1.load('dialog.html #wrapper').dialog('open');  }); 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -