Merge pull request #11720 from zfox23/commerce_getToBuy

Change 'GET' to 'BUY' when hovering over costed items
This commit is contained in:
Zach Fox 2017-11-01 09:49:39 -07:00 committed by GitHub
commit 82816b5551
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -290,11 +290,17 @@
}
});
// change pricing to GET on button hover
// change pricing to GET/BUY on button hover
$('body').on('mouseenter', '#price-or-edit .price', function () {
var $this = $(this);
$this.data('initialHtml', $this.html());
$this.text('GET');
var cost = $(this).parent().siblings().text();
if (parseInt(cost) > 0) {
$this.text('BUY');
} else {
$this.text('GET');
}
});
$('body').on('mouseleave', '#price-or-edit .price', function () {