Hello folks,
I have some html returned via ajax that contains several 'a' tags to
which I am binding a function.
Both of the following methods does the job, but my perception of other
posts about this general practice from more wiser folk than me is that
the first method is the better method.
Now let's try to simplify this a bit :
$('a.c_update').each(function() {
var $a = $(this);
var q = $a.attr('id');
$a.bind(click, function() {
doStuff('getitem',q); // hmm, I don't like this variable much...
return false;
});
});
$('a.c_update').each(function() {
var $a = $(this);
$a.bind(click,
2 matches
Mail list logo