No. You are trying to mix a function context with a string.
Use thisas a selector context or call on to search within the element's DOM area. Or find()$(this)
$('.galler_attr').bind('click', function() {
$(this).find(':first-child').css('color', 'red');
});
or this (which eliminates this internally):
$('.galler_attr').bind('click', function() {
$(':first-child', this).css('color', 'red');
});
source
share