I am creating these div's dynamically when user adds products to compare.
//code in jquery
var innerdiv='<div id="innerdiv'+value.code+'"'+'>'+value.name+'<img src="'+value.thumbnail+'"/></div>';
$('#compare-pane').append(innerdiv);
How do I check dynamically if the compare pane is empty or it has inner divs?
I have to hide a button if compare-pane is empty.
The inner div id
is dynamically generated (e.g innerdiv166104
).
How do I check if any inner div exists? I cannot use empty check as there are another elements inside compare-pane too which are required.
I cannot fetch the inner div id's
as they will be coming dynamically as per users selection.