0
 $('.sband_level1 li').live('click',function(e) {
   e.preventDefault();      
$.ajax({
        type: "GET",
        url: base_url+"product/update_products",
        data: "style_id="+style_list+'&prod_id='+brand_list+'&term_name='+term_name+'&term_id='+term_id,
        context: this,
        async: false,
        beforeSend: function() {
         $('.blocker_new').css('display','block')
        }, 
        success: function(msg){
         $('#page_wn').empty();
         $('#page_wn').append(msg);
         $('.blocker_new').removeAttr('style')
        }
       });
});

when I do click n FF my div is coming properly; that is blocker new div. While same thing is not working in chrome...that is blocker new div is not coming....my ajax is working properly...I am getting correct output..

afuzzyllama
  • 6,275
  • 5
  • 42
  • 61
cnm1990
  • 50
  • 5

2 Answers2

1

As far as I can tell, Chrome ignores requests to remove the "style" attribute of a DOM element.

     $('.blocker_new').css('display', 'none');

should work, or more simply

     $('.blocker_new').hide();
Pointy
  • 371,531
  • 55
  • 528
  • 584
  • Hi Pointy, I tried both things 1) $('.blocker_new').hide(); 2)$('.blocker_new').css('display','none'); But still the same issue I am facing. when I comment $('.blocker_new').hide(); afer successful ajax call my div is getting load. so jus to display it is taking lot of time. – cnm1990 Dec 16 '13 at 14:34
  • @cnm1990 well I'm not sure I understand exactly what is not working. I don't know what you mean by, "blocker_new is not coming". – Pointy Dec 16 '13 at 14:36
  • Hi pointy, Sorry for the above reply..actually was in hurry so couldnt explain you properly. I am trying to show loading text on click. This image is coming from the bloker_new div. so When I do click that text is not coming.same thing is Fire fox – cnm1990 Dec 16 '13 at 16:37
0

try moving your $('.blocker_new').hide(); to the complete callback

...
complete:function() {
$('.blocker_new').hide();
}
...
MaK
  • 586
  • 4
  • 23