[jQuery] jQuery-way for filtering self + all children

2009-05-04 Thread Pappy
Just curious... what's the jQuery-way of saying "Give me all children that match a filter and include myself if I happen to match as well."? I've been using - element.find("*").andSelf().filter([myfilter]) but that seems kludgy. Is there a better way? If not, I'll just wrap this as "findInclus

[jQuery] jQuery way

2009-01-04 Thread Dirceu Barquette
Hi all! Is there better way? var elem = $('#container')[0]; var arr = ["header","content","footer"]; jQuery.each(elem.childNodes,function(k,v) { if (jQuery.inArray(v.id, arr) < 0) { $(v).empty(); } }) thanks Dirceu Barquette

[jQuery] jquery way to set page title?

2007-06-01 Thread [EMAIL PROTECTED]
Hi, Subject line is the question. How do I use JQuery to set the page title (what goes in the tags)? Thanks, - Dave