var i=5; //1 $('#Nam_'+i).closest('div'); //2 $('#Nam_'+i).parent().parent('div'); //3 $('div:has(#Nam_'+i));