I want to parse javascript object as html. Without appending it to dom.
But my code is not working
var html ='<div><div class="b"><div class="a">hello</div><div class"c">bye</div></div></div>';
var j=$(html);
var k=$(j).not('.a');
alert($(k).html());
I want to hide div having class a . but code is not working. Where my code is wrong ?
demo
http://jsfiddle.net/fAtZz/2/
Try this fiddle: http://jsfiddle.net/fAtZz/4/
The idea is to create a proper
divwrapper around your html and append this html to this div. After that you can access to inner elements and modify them. However I’m not sure that it is what you want 🙂