Can I someone recognize version of Safari browser in js or jQuery? I am not looking for webkit version but for version of Safari (for example: 5.1.7).
I need to hide some element for Safari which is less than v7 :(
Can I someone recognize version of Safari browser in js or jQuery? I am not looking for webkit version but for version of Safari (for example: 5.1.7).
I need to hide some element for Safari which is less than v7 :(
This hack worked out by combining multiple other hacks is for 6.1+:
/* Safari 6.1+ (9.0 is the latest version of Safari at this time) */
@media screen and (min-color-index:0)
and(-webkit-min-device-pixel-ratio:0) { @media
{
.safari_only {
color:#0000FF;
background-color:#CCCCCC;
}
}}
Below are hacks that separate 6.1-7.0, and 7.1+ These also required a combination of multiple hacks in order to get the right result:
/* Safari 6.1-7.0 */
@media screen and (-webkit-min-device-pixel-ratio:0)
and (min-color-index:0)
{
.safari_only {(;
color:#0000FF;
background-color:#CCCCCC;
);}
}
Here is one for Safari 8 and newer:
/* Safari 7.1+ (9.0 is the latest version of Safari at this time) */
_::-webkit-full-page-media, _:future, :root .safari_only {
color:#0000FF;
background-color:#CCCCCC;
}
refer this link: https://jeffclayton.wordpress.com/2015/04/28/css-hacks-for-safari-6-1-7-and-8-not-chrome/
Use
if(speechSynthesis){
//code to be run in Safari 7+
}else{
//code not to be run in said versions
}
This should work, as speechSynthesis
was added in version 7.