Bug Tracker

Ticket #5758: ie7_radio.html

File ie7_radio.html, 1.0 KB (added by Pierre, 13 years ago)

Demo of the bug (open me in IE7)

Line 
1<html>
2<head>
3<title>Manipulation in IE7 drops value of radio buttons</title>
4<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
5</head>
6
7<body>
8<form>
9
10<h1>Manipulation in IE7 drops value of radio buttons</h1>
11
12<p>Instructions : check "female", then click button.</p>
13<p>In Firefox, the checked radio is kept -- That's correct.<br />
14   In IE, the checked radio is lost -- That's the bug.</p>
15
16<button type="button">Click to move both radio buttons down.</button>
17
18<h2>Source</h2>
19<div id="source">
20<input type="radio" name="sex" value="male" checked="checked" /> Male
21<input type="radio" name="sex" value="female" /> Female
22</div>
23
24<h2>Target</h2>
25<div id="target">
26</div>
27
28</form>
29
30<script type="text/javascript">
31
32$(document).ready(function(){
33   $("button").click(function(){
34      var source = $("#source");
35      var target = $("#target");
36      target.after(source); 
37      /* the same happens also with before, insertAfter, and insertBefore */
38   });
39});
40</script>
41
42</body>
43</html>