We would like to know how to select attribute by value.
<!-- w ww .jav a 2 s . co m-->
<html>
<head>
<script type="text/javascript" src='http://code.jquery.com/jquery-1.5.2.js'></script>
<script type="text/javascript">
$(document).ready(function(){
$("input[name='me']").next().text(" changed");
});
</script>
</head>
<body>
<div>
<input type="radio" name="me" value="A" />
<span>data</span>
</div>
<div>
<input type="radio" name="me" value="B" />
<span>data</span>
</div>
<div>
<input type="radio" name="me" value="C" />
<span>data</span>
</div>
</body>
</html>
The code above is rendered as follows: