Reputation: 148
I have the following function working on any devices except ios 11 and don't know why, I have tried some solutions found here but it doesnt work, like : change the selector, add 'cursor:pointer' style, set an empty onclick before the function, without success.
Any idea why its this happening (or not happening),
This is the js code
$('#buy-mobile-buttons-section').delegate('.buy-button', 'click', function(data) {
alert('E');
var $self = $(this);
addToCart($(this), function(data){
if (data > 0){
addGMTAddToCart($self);
var url = Routing.generate('pcc_cart_detail');
$(location).attr("href", url);
}
});
});
and this is the HTML
<button type="button" data-loading-text="Añadiendo..." id="js-buy-button-mobile" class="btn btn-primary btn-lg buy GTM-addToCart buy-button"
data-name="Asus K541UA-GO1205T Intel Core i7-7500U/8GB/1TB/15.6""
data-id="134853" data-price="633.49" data-brand="Asus"
data-category="Portátiles" data-qty="1">
<strong>Buy</strong>
<i class="pccom-icon">]</i>
I hope you can understand it, my english is no the best arround here
Upvotes: 0
Views: 1065
Reputation: 137
Try jquery bind function.
for example:
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});
Upvotes: 1