Reputation: 667
trying to not run this script if the URL is http://convoy.nyc/commerce/show-cart , but something isn't working correctly
if (window.location.indexOf('show-cart') == -1){
}
else {
window.onload = function(){
$( ".sqs-money-native" ).append( " per person" );
}
}
Upvotes: 2
Views: 152
Reputation: 21759
You almost got it, you where missing the .href:
if (window.location.href.indexOf('show-cart') === -1){
window.onload = function(){
$( ".sqs-money-native" ).append( " per person" );
}
}
Upvotes: 5