Clear Before Reload?
Clear Before Reload?
Greetings!
Being new to jQuery, I had a simple question for the community
Consider the following code:
-
<html>
<head>
<script src="jquery-1.3.2.js"></script>
<script type="text/javascript">
function DocLoadup(HTMLName,DestDiv)
{
$(document).ready(function(){$("div#" + DestDiv).load(HTMLName);});
}
</script>
</head>
<body>
<a href="javascript:void(0)" onclick="DocLoadup('Test.html','div1');">Test Load</a><br><br>
<div id="div1">
</div>
</body>
</html>
All seems straightforward enough; and all works well without hitting the error console on FireFox
However, I am concerned that, due to my newness in using the toolbox, I've missed something here. In particular, is there a need to explicitly clear "div1" in DocLoadup BEFORE loading the div with subsequent content? Can anyone see anything else in my humble DocLoadup function which would pose a compatibility/functional problem somewhere (for the record, I'm using this to load a page with js in/linked to it)???
Really liking my experience here! Looking forward to getting it all together with jQuery!
Thanks --