I'm trying to work off of a question that Stefano Zanella answered in the link here. text input value greater than.. jQuery
I need a model to pop up when the shopping cart subtotal is greater than $40.
The code works as long as there is no dollar sign in the subtotal. however, The cart outputs the subtotal with a dollar sign and I don't know how to remove it before calling the alert.
<div id="subtotal-alert"">$55.00</div>
<script>
$("input[type='text'][name='subtotal-alert']").change(function() {
if ($(this).val() >= 41) {
alert("To order quantity greater than 40 please use the contact form.");
$(this).val('');
$(this).focus();
}
});