On this asp.net site I'm working on, I want the pages to be more dynamic and less jump from page to page. I have this code;
$(document).ready(function () {
$('body').append('<div id="modalPopupOverlay"></div><div id="modalPopup"></div>');
$("a.showInModal").click(function (e) {
e.preventDefault();
var url = $(this).attr("href");
$('#modalPopup').load(url+" #content");
$('#modalPopup').show();
$('#modalPopupOverlay').show();
});
};)
This fetches the #content from the links page, and displays it in my popup, which is exactly like I want it.
The problem comes when the linked page contains a script,(which they do sometimes, tag-boxes and whatsnots) since the jquery .load drops all script-tags.
Anyone have a solution?