There's a HTML:
<div class="test">
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</div>
And a bit of JS:
$(document).ready(function() {
// do stuff when DOM is ready
$(".test ul").append('<li>Dupa</li>');
});
Why does it add nothing, but if I remove html from append's argument string,
.append('Dupa')
it works - but that's not the point - new text is added as anonymous block, not li item as I wanted.
Anu suggestions?
edit: Argh, I've found the problem. I modified a file saved from Firefox's "Save page" option, the extension was .xhtml - and here's the problem. I renamed it and it works fine.
Thanks :)