I am looking for a way to to slide the border bottom to when the mouse hovers each image. At present, when I click each image, the border bottom class is removed from the others and added to the clicked one. Is there a way to animate it to a sliding effect?
Code: https://jsfiddle.net/PeterR/dbbwfbws/
$(document).ready(function () {
$("#feature1").addClass("iconunderline");
$("#feature2").removeClass("iconunderline");
$("#feature3").removeClass("iconunderline");
})
$("#feature1").click(function () {
$("#feature1").addClass("iconunderline");
$("#feature2").removeClass("iconunderline");
$("#feature3").removeClass("iconunderline");
})
$("#feature2").click(function () {
$("#feature1").removeClass("iconunderline");
$("#feature2").addClass("iconunderline");
$("#feature3").removeClass("iconunderline");
})
$("#feature3").click(function () {
$("#feature1").removeClass("iconunderline");
$("#feature2").removeClass("iconunderline");
$("#feature3").addClass("iconunderline");
})