templates - weird behavior with jquery -
i've removed previous question because found problem in jquery itself.
imagine code :
var el = $('<ul><li/></ul><a id="clickme">click me!</a><p>').find('#clickme'); why clickme isn't found ?
because .find() looks descendants, use in case filter() instead:
var el = $('<ul><li/></ul><a id="clickme">click me!</a><p>').filter('#clickme'); note: in html string, not closing <p> tag.
Comments
Post a Comment