Hi,

live does not support the 'change' event yet, read here :
http://docs.jquery.com/Events/live

it works on some browsers (FF) but not on all, IE does not fire the
event.

Using the livequery script could solve the problem:

  $('#jump').livequery(function() {
     $(this).change(function() {
     alert(1);
    });
  });




On 31 Lug, 09:25, rupak mandal <rupakn...@gmail.com> wrote:
> hi David, you have to bind "jump" in load callback function.
>  $(function() {
>        $.ajaxSetup({
>                cache: false
>        });
>
>        $('#btn').click(function() {
>                $('div:first').load('b.html',function(){loadCallback();});
>        });
>
> });
>
> function  loadCallback()
> {
>       $('#jump').live('change', function() {
>                alert(1);
>        });
>
> }
>
> I think this will fulfill your requirement .
>
>
>
> On Fri, Jul 31, 2009 at 12:28 PM, David .Wu <chan1...@gmail.com> wrote:
>
> > If I load b.html in firefox, alert(1) will work, but ont work in IE.
>
> > page a.html
>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml";>
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> > <title>live</title>
> > <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
> > </head>
>
> > <body>
> > <div style="width: 300px; height: 300px; border: 1px solid red;"></
> > div>
> > <input type="button" id="btn" value="btn" />
> > <script>
> > $(function() {
> >        $.ajaxSetup({
> >                cache: false
> >        });
>
> >        $('#btn').click(function() {
> >                $('div:first').load('b.html');
> >        });
>
> >        $('#jump').live('change', function() {
> >                alert(1);
> >        });
> > });
> > </script>
> > </body>
> > </html>
>
> > page b.html
> > <select id="jump">
> >        <option value="1">1</option>
> >    <option value="2">2</option>
> > </select>- Nascondi testo citato
>
> - Mostra testo citato -

Reply via email to