using focus function with jquery live

Posted by Pradyut Bhattacharya on Stack Overflow See other posts from Stack Overflow or by Pradyut Bhattacharya
Published on 2010-04-28T23:57:29Z Indexed on 2010/04/29 0:17 UTC
Read the original article Hit count: 390

Filed under:
|

I have a page in which i can successfully use the jquery focus function using live...

$(".comment_text_class").live('focus',
function() {
   //do something...
});

but when something comes into the page(ajax loading) the focus function doesn't work

as should be using the live function...

as suggested i used focusin function..

$(".comment_text_class").live('focusin',
function() {
   //do something...
});

but still new elements do not have the behavior...

also i want to hide something using the live function but it doesn't work at all..

even for the elements in the page itself...

   $(".comment_button").live('hide', function(){});

is the focus and hide function implemented at all by jquery 1.4.2 or is it a bug...
because the live focus was not working with jquery 1.4 version...

Please help...

thanks

Pradyut
India

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-live