hello all
i create one div and include by ajax (html code) but the problen, the jquery his don work into the div
example:
Code:
<script src="http://code.jquery.com/jquery-1.3.js"></script>
<style>
div{
border:1px solid #000;
width:10%;
padding:15px;
margin: 5px;
}
</style>
<a href='JAVASCRIPT:New_code_div()'>Click Here</a> for change code in div<br>
<div id = 'id_div'>
Original code<br>
<a href='JAVASCRIPT:send_msg()'>msg from JS</a><br>
<a href='#' class='msg'>msg from JQuery</a><br>
</div>
<script>
function New_code_div(){
x = document.getElementById('id_div');
x.innerHTML = "include code<br><a href='JAVASCRIPT:send_msg()'>msg from JS</a><br><a href='#' class='msg'>msg from JQuery</a>";
}
function send_msg(){alert('hello from JS')}
$(document).ready(function(){
$(".msg").click(function(){
alert("hello from JQuery");
});
});
</script>
any solution for this problem ?????