javascript - Load a page via .load in pop-up -


i'm trying load php page via jquery. want have pop-up effect. tried using code below, when click event triggered, seems if css imported page being imported. page content not appear, changes due css conflicts.

i'd page load , not conflict other css

function previewpop(){     $(".pop").click(function(){         $("iframe#preview").load("templates/1.php",            function(){$("iframe#preview").fadein(300); })     }); }; 

<div id="frame_wrapper">  </div>    $(".pop").click(function(){  var the_iframe = '<iframe id="my_iframe" src="' + templates/1.php + '" height="500px" width="500px">';  $('#frame_wrapper').append(the_iframe); }); 

i hate dealing iframes, it's easier create new 1 , destroy necessary.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -