I've got some p
tags with the class PointsToggle
<p class="PointsToggle">POINTS STATEMENT - AVAILABLE 7AM TOMORROW</p>
<p class="PointsToggle">SOME OTHER TEXT</p>
And some jQuery like this
$('.PointsToggle').each(function() {
if ($(this).text = 'POINTS STATEMENT - AVAILABLE 7AM TOMORROW') {
$(this).css('width', '510px');
}
else {
$(this).css('width', '20px');
}
})
But I can't seem to get it to work
Any ideas?
Thanks
Jamie