When I display HTML code like this
<div class="btn btn-pagination">
<i class="fa fa-angle-right"></i>
</div>
and want to replace fa fa-angle-right
with myClass
when the page loads.
I attempted:
$(document).ready(function () {
$('.btn.btn-pagination').children($('.fa.fa-angle-right').removeClass());
$('.btn.btn-pagination').children().addClass('myClass');
})
This approach did not work. Can you help me understand what I'm doing wrong here?