demos/index: quick fix for #3810

This commit is contained in:
Bohdan Ganicky 2009-01-20 14:44:28 +00:00
parent b6bf540c0d
commit 274ff534db

View File

@ -164,7 +164,9 @@
data = data.replace(/<title.*>.*<\/title>/ig,""); // Remove title tags
data = data.replace(/((href|src)=["'])(?!(http|#))/ig, "$1" + directory + "/");
$('#demo-style').remove();
$('#demo-frame').empty().html(data);
$('#demo-frame style').clone().appendTo('head').attr('id','demo-style');
$('#demo-link a').attr('href', path);
updateDemoNotes();
});