|
|
@ -231,7 +231,11 @@ |
|
|
|
clearTimeout(options._timeout); |
|
|
|
clearTimeout(options._timeout); |
|
|
|
} |
|
|
|
} |
|
|
|
if (xhr.readyState === 4) { |
|
|
|
if (xhr.readyState === 4) { |
|
|
|
xhr.status === 200 ? success(xhr, options) : failure(options.url); |
|
|
|
if (xhr.status === 200) { |
|
|
|
|
|
|
|
success(xhr, options); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
failure(options.url); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -351,7 +355,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!transition) { |
|
|
|
if (!transition) { |
|
|
|
complete && complete(); |
|
|
|
if (complete) { |
|
|
|
|
|
|
|
complete(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (transition === 'fade') { |
|
|
|
if (transition === 'fade') { |
|
|
@ -367,7 +373,9 @@ |
|
|
|
container.parentNode.removeChild(container); |
|
|
|
container.parentNode.removeChild(container); |
|
|
|
swap.classList.remove('fade'); |
|
|
|
swap.classList.remove('fade'); |
|
|
|
swap.classList.remove('in'); |
|
|
|
swap.classList.remove('in'); |
|
|
|
complete && complete(); |
|
|
|
if (complete) { |
|
|
|
|
|
|
|
complete(); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
container.addEventListener('webkitTransitionEnd', fadeContainerEnd); |
|
|
|
container.addEventListener('webkitTransitionEnd', fadeContainerEnd); |
|
|
|
|
|
|
|
|
|
|
@ -379,7 +387,9 @@ |
|
|
|
swap.classList.remove('sliding', 'sliding-in'); |
|
|
|
swap.classList.remove('sliding', 'sliding-in'); |
|
|
|
swap.classList.remove(swapDirection); |
|
|
|
swap.classList.remove(swapDirection); |
|
|
|
container.parentNode.removeChild(container); |
|
|
|
container.parentNode.removeChild(container); |
|
|
|
complete && complete(); |
|
|
|
if (complete) { |
|
|
|
|
|
|
|
complete(); |
|
|
|
|
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
container.offsetWidth; // force reflow
|
|
|
|
container.offsetWidth; // force reflow
|
|
|
|