mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Disable via CSS class
This commit is contained in:
parent
a2f61e9505
commit
50ca4dc079
3 changed files with 16 additions and 18 deletions
|
@ -17,20 +17,14 @@ export const setEnabled = (selectorOrElement, enable, form = null) => {
|
|||
}
|
||||
|
||||
if (enable) {
|
||||
jQuery(element).css({
|
||||
'cursor': '',
|
||||
'-webkit-filter': '',
|
||||
'filter': '',
|
||||
} )
|
||||
jQuery(element)
|
||||
.removeClass('ppcp-disabled')
|
||||
.off('mouseup')
|
||||
.find('> *')
|
||||
.css('pointer-events', '');
|
||||
} else {
|
||||
jQuery(element).css({
|
||||
'cursor': 'not-allowed',
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'filter': 'grayscale(100%)',
|
||||
})
|
||||
jQuery(element)
|
||||
.addClass('ppcp-disabled')
|
||||
.on('mouseup', function(event) {
|
||||
event.stopImmediatePropagation();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue