i am using jquery browser detection function to alert a different value on different browser but seem it is conflict with safari and chrome. they both are alerting same value.
this function is working fine in all browser but the problem with safari and chrome only. thanks in advance.
<script type="text/javascript">
$(function (){
var m= $.browser;
if(m.webkit) {
alert('chorme')
}
else if(m.safari) {
alert('safari')
}
else {alert('bye bye')}
})
</script>
Safari and Chrome use the same rendering engine, Webkit. Look for Safari first, then the other Webkit browsers. There really is no reason to differentiate between the two in a realistic scenario; they will render webpages virtually identically in almost every case.
If you need to separate them, however, try this: