jQuery selector for all inputs checked or other type than radio -


i'm totally lost how following: - select checked radio , other inputs of different type radio inside 1 div

selecting input should $(':input') selecting checked radio should $( "input[type=radio]:checked") , of course inside div $('#mydiv')

$('#mydiv :input') matches 2 conditions: inputs inside div. can of course test type property after, wondering if in 1 selector ?

documentation: multiple selector (“selector1, selector2, selectorn”)

if have 2 selectors, example:

$("div#id") 

and

$("p.class") 

you can combine them , use them this:

$("div#id, p.class") 

so, in case, should use:

$("#mydiv :input[type=radio]:checked, #mydiv :input:not([type=radio])") 

Comments

Popular posts from this blog

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -