Strange safari's behaviour
I am using JS to split my ePub chapter into pages. I wrap code with the new divs that will represent separate page. Also my CSS has style for new divs. Everything is fine while my file has filename extension 'html', but that ePub provide xml files and in Safari style for new divs are not applied. (I can rename file, and renamed xml to html start to wok). What I am doing wrong? Thanks for any help!
Got IT! The piece of code that caused it:
var wrapper = document.createElement( 'div' );
And it should be replaced with
var wrapper = document.createElementNS ? document.createElementNS( 'http://www.w3.org/1999/xhtml', 'div' ) :document.createElement( 'div' );