I wrote an event to open a new browser tab ( window.open ) using jQuery, as shown below:
$(document).on('touchstart click', '.myClass', {self: this}, function (e) { var mylink = e.data.self.validateDomValue(this, 'attr=data-affiliate') if(myLink) { window.open(mylink, '_blank'); } });
These scripts work well for Windows, Mac and iPad, but the problem arises for the iPhone. The event does not shoot on the iPhone (version: 5, 6 and 7). What was my mistake? Any of your suggestions will be appreciated.
source share