[jQuery] jquery append() works for local but not when loaded from server side? the same html file
the html is like the following. it works fine if I load it as a local
html file, but when I load it from a server, it doesn't, I printed $
("#show_messages_div").html() in console but it showed nothing. it
just doesn't make any sense to me. I tried searching around but found
nothing. can anybody give me a clue? thanks.
BTW:when I load it from server side, it shows nothing but if I type "$
("#show_messages_div").append("dfdfdf")" in console, it works
...
<script type="text/javascript">
$(document).ready(function() {
$("#show_messages_div").append('<h2>xxxx</h2>');
});
</script>
...
<div id="show_messages_div" width="300"></div>