Hi guys, I'm trying to get the following to work in Safari, but it just wont
add the script source & I can't figure out why.

This is my code:
<head>
<title></title>
<script type="text/javascript" src="jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {
  if($.browser.msie) {
        $('#scriptReplace').attr("src","test2-ie.js");
  }
  else {
        $('#scriptReplace').attr("src","test2-mozilla-EtAl.js");
  }
});
</script>
<link rel="stylesheet" href="test2.css" media="screen,projection"
type="text/css" />
<script id="scriptReplace" type="text/javascript" ></script>
</head>

It works fine in IE, Opera & Firefox, yet it wont work in Safari (2.0.4).
Does it take longer for Safari's DOM to be ready? Is using an ID to locate
the correct script tag the right way to go?

Cheers.
-- 
View this message in context: 
http://www.nabble.com/Problems-with-script-replacement-in-Safari-tf3481746.html#a9718408
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to