html - After ajax request jquery can't find the correct div -
for project load html file populate div
s directly inserting html content div
s. problem is, have many elements has div inside them same id. causes problem select correct 1 i.e. $('#div_name')
. finds wrong one.
how can solve problem.
update
$('.to_be_filled:eq(1)').children('#graph_container').css('background-color', 'red'); $('.to_be_filled:eq(2)').children('#graph_container').css('background-color', 'green');
since eq() supplied index zero-based, select 2nd , 3rd need select eq(1),eq(2)...
Comments
Post a Comment