i would like to detect safari 3 browser so that i can style safari 3 separately
i am using
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
if ($.browser.webkit){}
$("div").css();
});
</script>
if i use if ($.browser.webkit){} this will detect both safari and chrome and will apply styles to both browsers
i tried
if ($.browser.webkit && ($.browser.version = "534.13") ){
alert("webkit chrome");
$("body").css("background","#555555");
}
if ($.browser.webkit && ($.browser.version = "3.2.3") ){
alert("webkit safari 3");
$("body").css("background","#cccccc");
}
when i use alert to see the version of chrome and safari on my machine i get
534.13 for chrome and 3.2.3 for safari
here both chrome and safari and taking #555 color first and then #ccc
how do i differentiate between chrome and safari so that i can style them differently
also i am using firefox 3.6.8 but when i use the alert to detect version
var x = $.browser.version;
instead of 3.6.8 it shows 1.9.2.8
when i clicked on help-about for firefox
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 GTB7.1 ( .NET CLR 3.5.30729; .NET4.0C)
so it is taking from here
so if i were to style separately for firefox without using -moz should i check
the firefox version as 3.6.8 or 1.9.2.8
for ie it displays as version 6, 7
also to use $.browser is
http://code.jquery.com/jquery-1.5.min.js
correct to use or should another version of jquery to be used