[jQuery] is this bug ? bind not work
Hi ...
I have table and inside contains image which class name = 'reason_img'
my js script was like this
<script>
$(document).ready(function(){
...... another initialization goes here ....
$('.reason_img').bind('click',function(e)
{display_reason(this);});
....
});
function display_reason(el){
alert('test');
}
.....
</script>
when i click on every image which has "reason_img" class .. it won't
work ..
I tried to type $('.reason_img').bind('click',function(e)
{display_reason(this);}); in my firebug
and everything works well ..
dunno why ...
is this a bug ? or should i place it outside the $
(document).ready() ?