The following code should increase the space between the letters when it opens in safari but it seems to ignore the order that changes the css property even though the alert does. Thanks.
function BrowserDetection() {
//Check if browser is IE or not
if (navigator.userAgent.search("MSIE") >= 0) {
alert("Browser is InternetExplorer");
}
//Check if browser is Chrome or not
else if (navigator.userAgent.search("Chrome") >= 0) {
alert("Browser is Chrome");
}
//Check if browser is Firefox or not
else if (navigator.userAgent.search("Firefox") >= 0) {
alert("Browser is FireFox");
}
//Check if browser is Safari or not
else if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) {
alert("Browser is Opera");
$('#slogan').css('letter-spacing', '3px');
}
//Check if browser is Opera or not
else if (navigator.userAgent.search("Opera") >= 0) {
alert("Browser is Opera");
}
}
BrowserDetection();
#slogan{
color:red;
font-family: MonkGothic;
font-size:30px;
letter-spacing:1px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<pre id="slogan">
AA
AA
AA
AA
</pre>