Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
Remove redundant events
Browse files Browse the repository at this point in the history
  • Loading branch information
humancopy committed May 20, 2016
1 parent fd1b169 commit ee91ccf
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions assets/ajax-cart.js.liquid
Expand Up @@ -246,7 +246,6 @@ var ajaxCart = (function(module, $) {

formOverride = function () {
$formContainer.on('submit', function(evt) {
$body.trigger('beforeSubmit.ajaxCart');
evt.preventDefault();

// Add class to be styled if desired
Expand All @@ -256,7 +255,6 @@ var ajaxCart = (function(module, $) {
$('.qty-error').remove();

ShopifyAPI.addItemFromForm(evt.target, itemAddedCallback, itemErrorCallback);
$body.trigger('afterSubmit.ajaxCart', evt);
});
};

Expand All @@ -272,7 +270,6 @@ var ajaxCart = (function(module, $) {

if (!!data.message) {
if (data.status == 422) {
$body.trigger('itemError.ajaxCart', data);
$formContainer.after('<div class="errors qty-error">'+ data.description +'</div>')
}
}
Expand Down Expand Up @@ -386,7 +383,6 @@ var ajaxCart = (function(module, $) {

// If it has a data-line, update the cart.
// Otherwise, just update the input's number
$body.trigger('adjustCart.ajaxCart', [this, line, qty]);
if (line) {
updateQuantity(line, qty);
} else {
Expand All @@ -408,7 +404,6 @@ var ajaxCart = (function(module, $) {

// If it has a data-line, update the cart
if (line) {
$body.trigger('adjustCart.ajaxCart', [this, line, qty]);
updateQuantity(line, qty);
}
});
Expand Down

0 comments on commit ee91ccf

Please sign in to comment.