Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1. <label for="test">demo*</label>
2.<label for="test">demo</label>

button click span yes/no chek

please help me

thanks in advance.
Posted
Comments
ZurdoDev 18-Jul-12 10:51am    
This does not make any sense.
Sandeep Mewara 18-Jul-12 12:17pm    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

1 solution

I agree you are not specific to your question.
I am answering below if I understood you correctly :

check for
JavaScript
 if( $("label").find("span").length >0 ){
//there is span you find it.
} else{
//there is no span  under the label.
} 
if it is 0 then there is no span exists inside the label else if it is more than 0 then there is span under the label.

Hope it helped.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900