Skip to content

Commit

Permalink
Added a remove function
Browse files Browse the repository at this point in the history
This is a proposed fix for issue msurguy#35 - duplicated spinner.  When calling the new remove function, the spinner is removed from the DOM, preventing a build up of duplicate spinners.
  • Loading branch information
Rob Markiewka committed Sep 20, 2015
1 parent 02e23a8 commit 2968972
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dist/ladda.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
}, 1e3);
return this;
},
remove: function() {
spinnerWrapper.parentNode.removeChild(spinnerWrapper);
return this;
},
toggle: function() {
if (this.isLoading()) {
this.stop();
Expand Down Expand Up @@ -157,4 +161,4 @@
create: create,
stopAll: stopAll
};
});
});

0 comments on commit 2968972

Please sign in to comment.