i have this code that has been provided to me by the plugin developer . it just removes event listeners from a textarea in product page ( wordpress ) but its not working on mobile . i have put an alert to see if it triggers on mobile but it doesnt every time i type nothing happens
(function(window, document, $) {
'use strict';
$(window).on('load', function() {
$('.tm-epo-field:text,input.tm-epo-field[type="number"],textarea.tm-epo-field').off('input.cpf keyup');
$('.tm-epo-field:text,input.tm-epo-field[type="number"],textarea.tm-epo-field').on('keyup', function() {
alert('test');
});
});
})(window, document, window.jQuery);
To Give more context i have this text area in all of my products that the costumer can just write some extra information about the product if they want. But on some product are doing heavy calculations and i think everytime someone in that textarea the plugin runs the calculations again even tho i dont need it thats why i need this code, in desktop it works perfectly but not on mobile any help ?
uix asas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.