Hey all,
I was just wondering if there is a clean implementation to getting elements before appending them to the DOM.
Example (w/ jQuery):
var html = "<div class = 'test'><div class = 'innertest'>Hello!</div></div>";
var innerDiv = $(html).find('.innertest');
I feel like its not possible, but I'd like to see if there is any implementation out there that allows for this- because this would be pretty sweet for classes and separation.
EDIT: I'm wondering if this is possible. What I meant by clean was it didn't use like a string replace or something hacked up. It's not a situation where I make them. If I could make them I would just create variables as I go. I have a situation where I have this html string that I'd like to find elements from and manipulate BEFORE I append it to my page.