Created
December 15, 2017 20:16
-
-
Save projoomexperts/37a961c20f9cff639a63e3a8b2510f3b to your computer and use it in GitHub Desktop.
Bigcommerce cart number only in span
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
jQuery(document).ready(function(){ | |
var carticon = jQuery('.TopMenu .CartLink span'); | |
var carttext = carticon.text(); | |
var cartnumber = carttext.replace(/\D/g,''); | |
carticon.text( cartnumber ); | |
}); | |
$( document ).ajaxComplete(function() { | |
var carticon = jQuery('.TopMenu .CartLink span'); | |
var carttext = carticon.text(); | |
var cartnumber = carttext.replace(/\D/g,''); | |
carticon.text( cartnumber ); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment