global ajax method not working
i have the following ajax code, the global events "ajaxSend" and "ajaxComplete" are not working:
any thoughs why?
regards
- $(function(){
- $.ajaxSetup ({
- cache: false
- });
- $("div#ajax_loading_icon").bind("ajaxSend", function(){
- $(this).css(border:"1px solid red")
- }).bind("ajaxComplete", function(){
- $(this).css(background:"url('')")
- })
- $('#submit_maj_password_email').click(function(){
- var _data= $(this.form).serialize()
- $.ajax({
- type: 'POST',
- //contentType: 'application/x-www-form-urlencoded;charset=iso-8859-1',
- url: 'validation_profil.php?var=maj_password_email',
- beforeSend: function(){
- /* if( $("form#maj_password_email input:[name=email]").val()==""){
- $("form#maj_password_email input:[name=email]").css({border:"1px solid red"})
- }*/
- },
- data:_data,
- global:true,
- cache: false,
- success: function(html){
- $('div#error').fadeIn().html(html)
- /*if($("div#valid_err_login").html()=="merci"){
- $("form#maj_password_email input:[name=email]").css({border:"1px solid gray"})
- }*/
- }
- })
- })
- })