It seems that Safari (and Chrome) ignores the <style> block when out
of the <head> section. Any idea how to modify the loadDemo() function
so it grabs the <style> block from the demo and appends it to the
<head> section of the main demo page? I've tried it a very very dirty
way and it actually works:
function loadDemo(path) {
$.get(path, function(data) {
...
...
data = data.replace(/<title.*>.*<\/title>/ig,""); // Remove title
tags
// dirty way to make the demo page work in webkit browsers
$('body').append('<div id="mess" class="ui-helper-hidden">'+data+'</
div>');
var $new_demo_style = $('#mess > style');
var $prev_demo_style = $('#prev-demo-style');
$prev_demo_style.length ? $prev_demo_style.replaceWith
($new_demo_style.attr('id','prev-demo-style')) : $('head').append
($new_demo_style.attr('id','prev-demo-style'));
$('#mess').remove();
...
...
}
I guess there must be a cleaner way to do the same thing. :)
--
Bohdan Ganicky
On Jan 16, 7:14 am, Eduardo Lundgren <
eduardolundg...@gmail.com>
wrote:
> any idea to fix this?
>