jQuery append() adds element before all others -


<div style="width: 100%; height: 50%;">     enter url: <input id="addresstext" type="text" style="width: 60%;"/>     <input id="sendrequestbutton" type="button" value="get"/> </div> <div id="container" style="width: 100%; height: 50%;"></div> 

later, have:

$(document).ready(function() {     $("#sendrequestbutton").click(function()     { $("#container").append("blablabla"); } } 

for reason, new text appears before every other element on page! what's reason , how can fix it? thanks.

strange, works code. sure not have other id="container" somewhere?

$("#sendrequestbutton").click(function(){    $("#container").append("blablabla");  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>    <div style="width: 100%; height: 50%;">      enter url: <input id="addresstext" type="text" style="width: 60%;"/>      <input id="sendrequestbutton" type="button" value="get"/>  </div>  <div id="container" style="width: 100%; height: 50%;"></div>


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -