出于某种原因,当我点击一个触发菜单打开的按钮时,添加的属性源不会通过浏览器用IOS mobile/平板电脑填充定义的图像(我尝试了Chrome)。
我四处寻找解决办法。我看到有人建议在我的点击功能中添加“touchend”,我也这么做了,但没有帮助。
$('.requestButton').on('click touchend', function (event) {
我不知道如何演示这种情况,因为它只发生在IOS移动/平板设备上。
Click here to see it live
向下滚动到下面的部分。点击“请求副本”。
在蓝色部分,应该会出现一个图像。它会出现在我的Android设备和桌面浏览器上。
有人知道为什么IOS设备上不会出现这种情况吗?
var button_engagement = '';
$('.requestButton').on('click touchend', function (event) {
catalogChoice = $(this).data('catalog-name');
$('.catalogName').html(catalogChoice + ' Catalog');
event.stopPropagation();
$('#catalogPop').fadeIn(350);
$('body').css('overflow', 'hidden');
$('#formWrap').show();
$('#catalogSuccessWrap').hide();
$('[name="description').val(catalogChoice);
var requestButSel = $(this).data('catalog-name');
var availability = '';
//Populating the Request Block 1 Img
if (requestButSel == 'Profile') {
requestImgLink = 'link';
requestImgAlt = 'Alt';
} else if (requestButSel == 'Fastening Technology') {
requestImgLink = 'link';
requestImgAlt = 'Alt';
}
$('#requestBlock1img').attr('src', requestImgLink);
$('#requestBlock1img').attr('alt', requestImgAlt);
});