mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 22:27:13 +02:00
Merge pull request #11720 from zfox23/commerce_getToBuy
Change 'GET' to 'BUY' when hovering over costed items
This commit is contained in:
commit
82816b5551
1 changed files with 8 additions and 2 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue