JavaScript
19
Вклад в тег
var sizeEmpty = form.find('.empty_field').size();
var sizeEmpty = form.find('.empty_field').length;
The .size() method is deprecated as of jQuery 1.8. Use the .length property instead.
removed: 3.0
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
$sizes-rules:(
/*keys(logo:**,menu:**,animals:**,titles:**,text:**)*/
480: (logo:16,menu:12,animals:16,titles:30,text:14),
720: (logo:18,menu:12,animals:22,titles:36,text:16),
1000: (logo:25,menu:15,animals:30,titles:46,text:16),
1260: (logo:32,menu:17,animals:35,titles:46,text:16)
);
@each $level,$list in $sizes-rules{
/*#{$level} #{map-get($list, logo)}*/
}