This appears very simple but I cannot see why it's not working. The selector is correct however the div .faqContent
is simply not being updated with the data-height
attribute.
$('.faqItem .faqContent').each(function(){
var h = $(this).height();
$(this).data('height',h);
});
I have checked that var h
is correct, it is in colsole.log as correctly holding the height.
EDIT It's absolutely not conflict, and console shows no errors.
See Question&Answers more detail:os