Can't you check the settings.url?

$(document).ready(function(){
  $(document).ajaxSend(function(event, request, settings){
    if(settings.url != 'faceboxurl') // replace faceboxurl with the
real url
    {
    $('body > div.container').fadeTo('normal', 0.33);
    $('#loading').show();
    }
  });
  $(document).ajaxComplete(function(event, request, settings){
    if(settings.url != 'faceboxurl') // replace faceboxurl with the
real url
    {
    $('body > div.container').fadeTo('normal', 1);
    $('#loading').hide();
    }
  });
});


On Jul 24, 6:05 am, Rodrigo Tassinari <rodr...@pittlandia.net> wrote:
> Anyone?
>
> On 20 jul, 12:34, Rodrigo Tassinari de Oliveira
>
> <rodr...@pittlandia.net> wrote:
> > Hello everyone,
>
> > I'm stuck with an annoying problem in this webapp I'm developing.
>
> > I've created a small code to be called automagically on every ajax
> > request, which shows a "loading..." div overlay while the ajax request
> > is being processed. This works fine, and the code used can be seen in
> > this pastie:
>
> >http://pastie.org/552179
>
> > However, we also use the Facebox plugin (http://famspam.com/facebox/)
> > in this app, and we don't want the "loading..." div overlay to show
> > when a facebox ajax request is triggered (the example link trigger is
> > also on the above pastie), since facebox has it's on "loading" thing.
>
> > I can't seem to do that. I binding the ajaxSend and ajaxComplete
> > callbacks to some css selector that would include everything except
> > the facebox links (a[rel*=facebox]), instead of the current $
> > (document) route, but I failed.
>
> > Does anyone have any ideas to help me with this?
>
> > Thanks a lot in advance,
> > Rodrigo.

Reply via email to