javascript - Targeting a span that is wrapped around a radio input -
my problem simple. i'm using template styling. way template handles form inputs wraps them in span tags. select radio button, have change class of span "checked". using checked="checked" or checked in input not work.
example:
<label class="radio"> <div class="radio" id="uniformed-undefined"> <span class="checked"> <input type="radio" name="grow" value="slash"> </span> </div>
how can target <span class="checked">
based on input name "grow" , value "slash" ?
i've looked .before() i'm not sure that's correct answer.
jquery multiple attribute selector
, jquery parent
$("input[name='grow'][value='slash']").parent("span");
Comments
Post a Comment