This is in angular. I have a button that works perfectly fine on larger screens ( ex. macbook ) with one simple click, but when it is on an iphone it only works with double click ( it works fine on android ). It is supposed to work on oneclick aswell. The alert is triggering on single clikc but not the photo upload. Can somebody have an ideea why is that so ? Thanks.
$scope.triggerUploadPhoto = function () {
var width = $(window).width();
alert(123);
if(width< 768){
$('#sidebar').css('display','');
$('#sidebar').addClass('modal-hidden');
$('#side-modal-upload-photo').removeClass('active-modal');
$('#side-modal-upload-photo').addClass('modal-hidden');
$('.five-item-on-hover').css('background-color','transparent');
}
$('#photo-upload').trigger('click');
$('.stored-images').trigger('click');
$scope.toggleUploadPhoto();
}