here is my code:
a.html :
<script>
$(function(){
$('#A').load('b.html');
$('h1').click(function(){
functionB();
});
});
</script>
<html>
<h1>Title</h1>
<div id='A'></div>
</html>
and,
b.html :
<script>
function functionB(){
alert('funcation B called');
}
</script>
<p>nothing</p>
seems that I can not call functionB() from root.
is there anyway to do? thanks
b.html(with either Ajax or an IFrame) to be able to accessfunctionB();. Alternatively you could placefunctionB();in an External JS File and reference it on both pages.