I hope you can help me. I need to load a css for each browser, (chorme, safari, mozilla, ie). I have found a solution to which I add the safari option, but still it does not work.
<script type="text/javascript">
var browser = navigator.userAgent.toLowerCase().indexOf('chrome') > -1 ? 'chrome' : 'other';
if (BrowserDetect.browser.indexOf("chrome")>-1) {
document.write('<'+'link rel="stylesheet" href="/css/chrome.css" />');
} else if (BrowserDetect.browser.indexOf("mozilla")>-1) {
document.write('<'+'link rel="stylesheet" href="css/mozilla.css" />');
} else if (BrowserDetect.browser.indexOf("explorer")>-1) {
document.write('<'+'link rel="stylesheet" href="css/explorer.css" />');
} else if (BrowserDetect.browser.indexOf("safari")>-1) {
document.write('<'+'link rel="stylesheet" href="css/safari.css" />');
}
</script>
on the page there is an HTML5 audio player, in each browser this player changes color, so they must be different for each one.