| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
|---|
| 2 | <html> |
|---|
| 3 | <head> |
|---|
| 4 | <title>jQuery 1.4 Live Change event not called in IE8</title> |
|---|
| 5 | </head> |
|---|
| 6 | <body> |
|---|
| 7 | <form> |
|---|
| 8 | <input type="text" value="Type here and tab away..." size="40" /><br/><br/> |
|---|
| 9 | <textarea>Type here and tab away...</textarea><br/><br/> |
|---|
| 10 | <input type="checkbox" /><br/><br/> |
|---|
| 11 | <input type="radio" name="rad" value="1"/><input type="radio" name="rad" value="2"/><br/><br/> |
|---|
| 12 | <select> |
|---|
| 13 | <option>Test 1</option> |
|---|
| 14 | <option>Test 2</option> |
|---|
| 15 | </select><br/><br/> |
|---|
| 16 | <select multiple="multiple"> |
|---|
| 17 | <option>Test 1</option> |
|---|
| 18 | <option>Test 2</option> |
|---|
| 19 | </select> |
|---|
| 20 | </form> |
|---|
| 21 | <hr/> |
|---|
| 22 | <pre> |
|---|
| 23 | $().ready(function() { |
|---|
| 24 | $(":input").live("change", function() { |
|---|
| 25 | $("form").after("<p>Called change!</p>"); |
|---|
| 26 | }); |
|---|
| 27 | }); |
|---|
| 28 | </pre> |
|---|
| 29 | <p>This will add a "Called change!" paragraph in Firefox 3.5, Safari and Chrome, but not in IE8</p> |
|---|
| 30 | |
|---|
| 31 | <!--script src="http://code.jquery.com/jquery-1.4rc1.js" type="text/javascript"></script--> |
|---|
| 32 | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js" type="text/javascript"></script> |
|---|
| 33 | <script type="text/javascript"> |
|---|
| 34 | $().ready(function() { |
|---|
| 35 | $(":input").live("change", function() { |
|---|
| 36 | $("form").after("<p>Called change!</p>"); |
|---|
| 37 | }); |
|---|
| 38 | }); |
|---|
| 39 | </script> |
|---|
| 40 | </body> |
|---|
| 41 | </html> |
|---|