S
SM
Using the selection on the left panel, I load the results on the right
panel using jQuery Ajax. So far it's working really good:
....
$.ajax({
url: "includes/content.php",
data: "letter=" + letter.substr(letter.lastIndexOf("=") + 1),
success: function(data) {
$('#wrapper').removeClass("loading");
$('#content').html(data).fadeIn(400);
}
});
....
After the results are loaded on the right panel, I click on an <a> tag
that is suppose to trigger some javascript but doesn't:
inside php file:
<a class="btn_play">Play</a>
javasscript to trigger:
$('a[class=btn_play]').click(function(event) {
event.preventDefault();
// get the A tag ref
var file = $(this).attr('href');
alert(file);
});
The same <a> tag also exists on the left panel and triggers correctly.
But, on the right panel, it doesn't trigger at all! I believe it's
because it doesn't see the javascript.
I'm sure this is come out already, but i can't find the solution.
Any hints?
Thanks
Marco
panel using jQuery Ajax. So far it's working really good:
....
$.ajax({
url: "includes/content.php",
data: "letter=" + letter.substr(letter.lastIndexOf("=") + 1),
success: function(data) {
$('#wrapper').removeClass("loading");
$('#content').html(data).fadeIn(400);
}
});
....
After the results are loaded on the right panel, I click on an <a> tag
that is suppose to trigger some javascript but doesn't:
inside php file:
<a class="btn_play">Play</a>
javasscript to trigger:
$('a[class=btn_play]').click(function(event) {
event.preventDefault();
// get the A tag ref
var file = $(this).attr('href');
alert(file);
});
The same <a> tag also exists on the left panel and triggers correctly.
But, on the right panel, it doesn't trigger at all! I believe it's
because it doesn't see the javascript.
I'm sure this is come out already, but i can't find the solution.
Any hints?
Thanks
Marco