Solved

detect safari version 6.1 and above

Posted on 2014-02-17
1
197 Views
Last Modified: 2014-03-11
Hi

How can i detect safari versions 6.1 and above with JS

Thanks
0
Comment
Question by:coolispaul
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39864993
var strVersion = navigator.userAgent.match(/\sVersion\/([^\s]*)/).pop();
var dVersion = strVersion.replace(/([^.]+).([^.]).?([^.])/,"$1.$2$3") * 1;
var test = dVersion > 6.1; // true or false

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now