Well, the title may not make any sense at all.. But anyway, I ma put some easy codes to clarify it.
I am using JQuery 1.3.2
Here is my JS
$(document).ready(function() {
$('#test').click(function() {
$('#result').html('<a href="#" id="hello">hello world</a>');
});
$('#hello').click(function() {
$('#result').html('<a href="#" id="asdf">Test #2</a>');
});
});
In html, I have a hyperlink id='test' and a div with id='result'. What I expect this JS code to is when I click on test, it shows the "Hello World". After that, when I click the "Hello World", it supposed to show "Test #2"
Any suggestion is very helpful...
Thank you.