Soldato
As title, I'm probably overlooking something really simple. Just trying to get the bars icon to change to a times and vice versa when clicked. Here's the code.
jQuery code is within a $(document).ready(function(){. I've followed the instructions on https://fontawesome.com/how-to-use/svg-with-js#with-jquery and used their code, but nada. Heeelp!
Code:
<div id="mobilebutton"><i class="fa fa-bars"></i></div>
Code:
$( "#mobilebutton" ).click(function() {
$( "#mobilenavoverlay" ).slideToggle( "slow", function() {
});
$(this)
.find('[data-fa-i2svg]')
.toggleClass('fa-times')
.toggleClass('fa-bars');
});
jQuery code is within a $(document).ready(function(){. I've followed the instructions on https://fontawesome.com/how-to-use/svg-with-js#with-jquery and used their code, but nada. Heeelp!