You can use the length property of the jQuery collection returned by your selector:
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_test_whether_an_element_exists.3F On 8 Okt., 13:19, zidoo <[EMAIL PROTECTED]> wrote: > if home some like this: > > $('<div id="editLng_'+lng_id+'"></div>').appendTo('body'); > > now when i create new element i need to check if that element already > exist, if exist focus, else create. I cant find in jquery > documentation isExist statement or something like that. > > Thanks.