I was able to use the custom link in menus to add the actual cart image with <i class=”fa fa-shopping-cart” aria-hidden=”true”></i>
But I would like to add the below cart info to display on my site when people add actual items to the cart, the amounts update in real time to the amount. How do i add the below script to the nav menu bar?
That’s not how javascript works. The code itself targets the elements it needs to change – you can place it wherever you like and it won’t make a difference. The footer is just best practice when it comes to JS.