detect safari version 6.1 and above

Hi

How can i detect safari versions 6.1 and above with JS

Thanks
coolispaulAsked:
Who is Participating?
 
leakim971PluritechnicianCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.