Search code examples
jquerycolorbox

Launch colorbox, cancel before it loads, launch 2nd different colorbox, both load in same window


I've been banging my head against a wall on this one for a while.

I've got multiple colorbox links on a page. When I click one, colorbox launches, and it fires off an ajax request, which happens to take up to 10 seconds or so to return. If I click out of that first colorbox, and click a second colorbox link, both pages load into the second colorbox window, stacked on top of each other.

Is there a way I can either abort the first colorbox ajax request, or at least prevent it from loading in the second window?


Solution

  • colorbox's author here. There is no way to cancel an ajax request, but later today I'll look into having colorbox ignore the results.

    *Update: Fixed as of v.1.4.4