jquery - How can I recognize Safari version in javascript? -


this question has answer here:

can recognize version of safari browser in js or jquery? not looking webkit version version of safari (for example: 5.1.7).

i need hide element safari less v7 :(

this hack worked out combining multiple other hacks 6.1+:

/* safari 6.1+ (9.0 latest version of safari @ time) */

@media screen , (min-color-index:0)  and(-webkit-min-device-pixel-ratio:0) { @media {     .safari_only {           color:#0000ff;          background-color:#cccccc;       } }} 

below hacks separate 6.1-7.0, , 7.1+ these required combination of multiple hacks in order right result:

/* safari 6.1-7.0 */

@media screen , (-webkit-min-device-pixel-ratio:0)  , (min-color-index:0) {      .safari_only {(;        color:#0000ff;        background-color:#cccccc;       );} } 

here 1 safari 8 , newer:

/* safari 7.1+ (9.0 latest version of safari @ time) */

_::-webkit-full-page-media, _:future, :root .safari_only {    color:#0000ff;    background-color:#cccccc;   } 

refer link: https://jeffclayton.wordpress.com/2015/04/28/css-hacks-for-safari-6-1-7-and-8-not-chrome/


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -