i want load html file pop window (like lightbox) using ui-dialog. tried following code, js functions inside loaded html page not triggerred. page content , images.
$('#lightbox_link').click(function(){ $('#lightbox_popup').load('new_lightbox.html').dialog({ resizable: false, height:650, width:980, dialogclass:'notitle', modal: true }); }); });
also need know, if ui-dialog support if html link created dynamically? have given static link. suppose link genereated , returned server, page loaded pop js functions in page being triggered? help.
if want reuse same dialog box on page number of links try this
html:
<a class="load" href="link_1.htm">load</a> <a class="load" href="link_2.htm">load</a> <div id="content"> <div id="content-holder"></div> </div>
javascript:
$(document)ready(function(){ $('#content').dialog({ resizable: false, height: 300, width: 500, dialogclass: 'notitle', modal: true }); $('#load').click(function (){ $("#content-holder").load($(this).attr("href")); $("#content").dialog('open'); return false; }) }
Comments
Post a Comment