Placing Wrap in a link list of desired title elements in opencart

I want to enclose a span in a wish list link in the header in my open topic.

I tried the following attempts, but failed, can someone suggest a better way?

THIS WORKS, BUT ONLY MEANS THANKS TO THE SECOND AND THEN REVIVES TO DEFAULT AGAIN. CLASS (WHIS) ​​ADDED "ADD TO WISHLIST" LINK

$(document).ready(function(e) { $('.whis').click(function(){ $("#header .links #wishlist-total").wrapInner("<span></span>"); }); }); 

THIS WORKS until he clicks on the "Add to Wish List" link.

 $(document).ready(function(e) { $("#header .links #wishlist-total").wrapInner("<span></span>"); }); 
+6
source share
1 answer

Try it with jQuery . function live ()

 $(function() { $(".whis").live("click", function(){ $("#header .links #wishlist-total").wrapInner("<span/>"); }); }); 
+1
source

All Articles