sant0sk1 (owner)

Revisions

gist: 209465 Download_button fork
public
Public Clone URL: git://gist.github.com/209465.git
Embed All Files: show embed
jquery_radio_button.html #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  <title>test</title>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
  <script type="text/javascript">
  $(function() {
    $('#my-div').children().not("a").click( function() {
      $("#my-div-radio").attr('checked', 'checked');
    });
  });
  </script>
 
</head>
<body>
  <div id="my-div">
    <p>This is text inside the div</p>
    <a href="#">a link.</a>
    <form>
      <input type="radio" name="test1" value="whoknows" id="my-div-radio"/>
    </form>
    <p>This is just some other text inside the div.</p>
  </div>
</body>
</html>