Technically, Safari is doing it right (but it's very frustrating). <style> elements can only go in the <head>, not the <body>. As far as I can tell, there's no reason for this rule and HTML5 will allow it, but XHTML does not. So Safari throws out the <style> elements that you are trying to append to the <body>. My solution was to separate out the <style> element as a .css file, and include it in the head: $('<link type="text/css" media="screen" rel="stylesheet" href="/css/ whatever.css">').appendTo('head');
Danny On Mar 9, 3:23 pm, rernens <[EMAIL PROTECTED]> wrote: > We extensively use jquery in conjunction with our proprietary CMS for > building web site and web application. > We use jquery 1.2.3 and face a problem only in Safari 3. > Styles injected with pages loaded through ajax seem not recognized and > as a result pages a not properly rendered. Works just fine in all > other browsers that we tested (IE7, Firefox 2 (windows and MacOS x, > Opera 9 (windows and MacOS X). > > http://immo.web-a-la-carte.comis a good example. Go to the "société" > tab and look at the form in the bottom left of the page. The form is > rendered properly in Firefox and other browsers listed above but not > in Safari 3. The form is dynamically generated and loaded with ajax > with the associated styles and javascripts. > > Has anyone an idea why css injected this way is not properly handled > by safari. > > Help appreciated.