Skip to content

Instantly share code, notes, and snippets.

@pavelpower
Last active January 3, 2016 05:39
Show Gist options
  • Save pavelpower/8417228 to your computer and use it in GitHub Desktop.
Save pavelpower/8417228 to your computer and use it in GitHub Desktop.
var MyModal = function() {
var $elem, options, Modal;
Modal = $.fn.modal.Constructor;
$elem = $('#myModal');
options = $.extend({}, Modal.DEFAULTS, $elem.data());
// call father constructor
Modal.call(this, $elem, options);
}
MyModal.prototype = $.fn.modal.Constructor.prototype;
var myModal = new MyModal({});
myModal.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment