javascript - Cannot target clicked element in iOS -


i have tried , failed on week figure out why ios devices won't target click on specific element.

jsfiddle

in jsfiddle can try click on 1. background, when click on 1 of colored buttons works charm, unless use ios device. why that? can'f figure out.

it .colors li not going trigged in ios devices reason.

$('.colors li').click(function(){     alert('yo'); }); 

here actual code doesn't triggered

$(document).on('click', '.bg ul.colors li', function () {     $(this).siblings().removeclass('selected');     $(this).addclass('selected');     $('.case_background').css({ 'background': $(this).css('background') });      caseobject.background = $(this).css('background'); }); 

just found out if say, nothing getting logged:

$(document).on('click', function(){ console.log('click') }); 

ios have touch events.. not click use:

$('.colors li').bind("click touchstart", function(){     alert('yo'); }); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -