There are a few ways. Have a read of this:

http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_AJAX_request.3F

Karl Rudd

On Thu, Jan 22, 2009 at 9:26 AM, phanorcoll <phanorc...@gmail.com> wrote:
>
> hi,
>
> i have the following code:
>
> $(function() {
>    $('.error').hide();
>    $('input.text-input').css({
>        backgroundColor:"#FFFFFF"
>    });
>    $('input.text-input').focus(function(){
>        $(this).css({
>            backgroundColor:"#FFDDAA"
>        });
>    });
>    });
>  ....
>  ....
>  ....
> });
>  it works fine with the form on in index.php,which its not loaded
> using ajax, but whe i load another form using ajax, those events stop
> working. is there a way to have global events so that every form,
> whether its loaded using ajax or not, can use them??
>

Reply via email to