I’ve been working on my own website – http://rapcities.com (warning – song plays automatically)
I just added all the legal text that I need for the site, and found that there were lots of random unwanted characters appearing (such as Â, â, and ¨). Some searching led me to change the character encoding of the site to UTF-8 – even though none of the text in my site uses non-western characters.
Changing the encoding fixes the problem, but it brings about a larger one. Whenever my site is displayed with UTF-8 character encoding, the Jquery dialog no longer works on my site.
The dialog should appear automatically when the site first opens (with an artist biography). Another dialog should appear when clicking on the DMCA/Terms of Service/Privacy Policy links, and a third should appear when clicking the basket with hearts inside it at the top right corner of the site.
I am thoroughly confused as to what is going on – both in regards to my original problem and the new one. Does anybody have any ideas?
Best,
Sami
I get an
unterminated string literalerror message in the console when I go to your page. It points to the switch statement in yourshowLegal(number)function.Instead of putting a whole bunch of HTML in a JavaScript string, I’d put it in a hidden
<div>. Then, your jQuery dialog script can reference the DOM element rather than forcing you to debug a giant, nasty HTML string.