Wednesday, 11 September 2013

Other elements disapper after page is loaded?

Other elements disapper after page is loaded?

I want call function javascript with Jquery. But after page is loaded, all
other elements are disappeared. You can see my code here. I need your fix.
<script src='http://code.jquery.com/jquery-1.10.1.min.js'></script>
<script type="text/javascript">
$(document).ready(function() {
$("#recentpost").each(function(){
mytext = "Food";
sticky();
});
});
</script>
<script type="text/javascript">
function sticky(){
document.write(""+mytext+"");
}
</script>
<div id="recentpost"></div>
<div>something here disappear after loaded page</div>
Thank for your help

No comments:

Post a Comment