text: !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.HSRemoveElement=t():e.HSRemoveElement=t()}(window,function(){return d={"./src/js/hs-remove-element.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HSRemoveElement; });\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar HSRemoveElement = /*#__PURE__*/function () {\n  function HSRemoveElement(elem, settings) {\n    _classCallCheck(this, HSRemoveElement);\n\n    this.elem = elem;\n    this.defaults = {\n      targetEl: null,\n      beforeDelete: null,\n      afterDelete: null\n    };\n    this.settings = settings;\n  }\n\n  _createClass(HSRemoveElement, [{\n    key: \"init\",\n    value: function init() {\n      var context = this,\n          $el = context.elem,\n          dataSettings = $el.attr('data-hs-remove-element-options') ? JSON.parse($el.attr('data-hs-remove-element-options')) : {},\n          options = $.extend(true, context.defaults, dataSettings, context.settings);\n\n      context._removeElement($el, options);\n    }\n  }, {\n    key: \"_removeElement\",\n    value: function _removeElement(el, config) {\n      el.on('click', function () {\n        if (typeof config.beforeDelete === 'function') {\n          var before = config.beforeDelete(el, config);\n          if (before === false) return;\n        }\n\n        $(config.targetEl).remove();\n\n        if (typeof config.afterDelete === 'function') {\n          config.afterDelete(el, config);\n        }\n      });\n    }\n  }]);\n\n  return HSRemoveElement;\n}();\n\n\n\n//# sourceURL=webpack://HSRemoveElement/./src/js/hs-remove-element.js?")}},e={},f.m=d,f.c=e,f.d=function(e,t,n){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)f.d(n,r,function(e){return t[e]}.bind(null,r));return n},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="",f(f.s="./src/js/hs-remove-element.js").default;function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e});