[jQuery] Selecting children of "this" ?
Hello, I'm just starting with jQuery and would like to know the best way to identify children elements of "this" to perform animation on. Some Googling brought me this seemingly useful code snippet: jQuery ("img", this); But I don't know the correct syntax for this. Here's my newbie shot-in-the-dark code: $(jQuery("li", this)).animate({ top : "60px" }, 3000 );
[jQuery] selecting children
Hi, my question is, why next line doesn't work: $("#conditions-"+get_sufix(type)+" > div,tr,span,label,select,input").each(function(){...}); nor next line: $("#conditions-"+get_sufix(type)+" div,tr,span,label,select,input").each(function(){...}); nor next line: $("#conditions-"+get_sufix(type)).children ("div,tr,span,label,select,input").each(function(){...}); and next line does work: $("#conditions-"+get_sufix(type)).find ("div,tr,span,label,select,input").each(function(){...}); for searching child nodes from a given node at any depth? find is implemented for working at any level and children and ">" only for the first level? Thanks
[jQuery] Selecting Children Of $(this)
I'm working on a wireframe for an ecommerce site. I need to simulate some shopping cart functionality, like updating total counts and dollar amounts on change(). I've already done this with a page that contains one table. This page contains multiple tables, so I need to add another loop: from <-- $(".someGrid input").each(function(){ //some kind of code... }); --> to <-- $(".someGrid").each(function(){ $(this + " input").each(function(){ //some kind of code }); }); --> The problem is, the second one isn't working. How can I loop through the tables, then loop through the inputs they contain?