Javascript-форум (https://javascript.ru/forum/)
-   jQuery (https://javascript.ru/forum/jquery/)
-   -   Изображение на iphone открывается в новом окне вместо лайтбокса (https://javascript.ru/forum/jquery/56525-izobrazhenie-na-iphone-otkryvaetsya-v-novom-okne-vmesto-lajjtboksa.html)

Ленча 20.06.2015 12:35

Изображение на iphone открывается в новом окне вместо лайтбокса
 
Используется

Slimbox v2.04 - The ultimate lightweight Lightbox clone for jQuery
(c) 2007-2010 Christophe Beyls <http://www.digitalia.be>
MIT-style license.
Patched for jQuery 1.9.

В конце скрипта есть вставка

if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
	jQuery(function($) {
		$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	});
}


Если убрать условие и оставить так

jQuery(function($) {
		$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	});


Всплывашка появляется и на iphone

Собственно, вопрос - по какой причине было прописано данное условие и, убрав его, я никаких нежелательных последствий не получу?


Часовой пояс GMT +3, время: 03:08.