I opened a link which looks exactly like this: http://localhost/anysite/#data_aa
Then, jquery performs the following:
$('a[href^="data_"]').click(function(){
//code to be executed and at end,
$("anyDIV").load('anyfile.php?parameter=anyvalue');
});
This selects all the links where the href attribute starts with “data_” to load data from PHP file.
Data and links are loaded successfully but the loaded links do not work which exactly looks as same I mentioned in beginning like this http://localhost/anysite/#data_ss…
Hope, You understood my problem and will be able to help me……
You need to use the
livemethod.The
clickbind happens at page load, so any content dynamically added afterwards wont be included in that bind, thelivemethod facilitates this.