CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript frameworks (http://www.codingforums.com/forumdisplay.php?f=62)
-   -   animate with parent. children (http://www.codingforums.com/showthread.php?t=177829)

Phil Jackson 09-24-2009 06:58 AM

animate with parent. children
 
Hi i have this:

Code:

$("#fname").parents("ul:eq(0)").children("li[class=description]").animate({fontSize: "16px"}, 1000);
Anyone know why it wont work yet this will??

Code:

$("#fname").parents("ul:eq(0)").children("li[class=description]").css("color", "red");

seco 09-24-2009 07:07 AM

are you getting an error at all?

Phil Jackson 09-24-2009 07:10 AM

nope just not working

Phil Jackson 09-24-2009 07:11 AM

Code:

$("#formSignup ul li p input.userInput").each({
                        if ( $(this).val() == "" ){
                                $(this).parents("ul:eq(0)").children("li[class=description]").css("color", "red");
                        } else {
                                $(this).parents("ul:eq(0)").children("li[class=description]").css("color", "black");
                        }
                });

This also is making my head scratch

Phil Jackson 09-24-2009 07:13 AM

idiot.
Code:

.each(function(){

seco 09-24-2009 07:14 AM

haha always somthin huh

Phil Jackson 09-24-2009 07:18 AM

sussed it, should have posted the html:

Code:

$("#submitForm").bind("click", function(){
        $("#formSignup ul li p input.userInput").each(function(){
                if ( $(this).val() == "" ){
                                $(this).parents("ul:eq(0)").children("li[class=description]").children("p").children("small").animate({fontSize: "11px"}, 1000).css("color", "red");
                        } else {
                                $(this).parents("ul:eq(0)").children("li[class=description]").children("p").children("small").animate({fontSize: "10px"}, 1000).css("color", "black");
                        }
                });
        });
});



All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.