Opened 14 years ago
Closed 14 years ago
#3515 closed bug (invalid)
ajaxStop not being bubbled to 'body' element
Reported by: | tamlyn | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.3 |
Component: | ajax | Version: | 1.2.6 |
Keywords: | Cc: | tamlyn, flesler | |
Blocked by: | Blocking: |
Description
This code works fine
$('#content').ajaxStart(function(){ $(this).addClass('loading'); }).ajaxStop(function(){ $(this).removeClass('loading'); });
but this doesn't:
$('body').ajaxStart(function(){ $(this).addClass('loading'); }).ajaxStop(function(){ $(this).removeClass('loading'); });
When attaching the event listeners to the body element it seems ajaxStop is not being triggered because the 'loading' class is not removed.
This, on the other hand, works fine:
$('#content').ajaxStart(function(){ $('body').addClass('loading'); }).ajaxStop(function(){ $('body').removeClass('loading'); });
Change History (5)
comment:1 Changed 14 years ago by
Cc: | tamlyn flesler added |
---|
comment:2 Changed 14 years ago by
need: | Review → Test Case |
---|
Can you make a test case to reproduce the problem ?
comment:4 Changed 14 years ago by
Hmmm, made a test case and it worked - tested the original and that now works too! Sorry about that. Please close as invalid.
comment:5 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
It works for me. Are you doing this inside a document.ready ?