I think I'm using removeData correctly but it doesn't seem to be working, here's what I'm seeing in the dev console, could anyone explain what I'm doing wrong?
I'm outputting the current data attribute value, calling removeData, then outputting the value again and its still there.
$('.questionList > li').eq(1).data('fieldlength')
3
$('.questionList > li').eq(1).removeData('fieldlength');
[
<li class="questionBox" data-createproblem="false" data-fieldlength="3" data-picklistvalues data-required="true" data-sfid="a04d000000ZBaM3AAL" data-type="Text">
<div class="questionLabel">Birthdate</div>
</li>
]
$('.questionList > li').eq(1).data('fieldlength')
3
jQuery.removeData($('.questionList > li').eq(1), "fieldlength")
– Clementinaclementine