Permalink
Browse files

add new global method setDefaultOptions

  • Loading branch information...
1 parent dc224a9 commit 5e37feadfb9f95f819d19b1cde90a9590df9416d @sandywalker committed Oct 18, 2016
Showing with 16 additions and 4 deletions.
  1. +1 −1 demo/test-issue195.html
  2. +7 −1 dist/jquery.webui-popover.js
  3. +1 −1 dist/jquery.webui-popover.min.js
  4. +7 −1 src/jquery.webui-popover.js
@@ -35,7 +35,7 @@
});
- WebuiPopovers.isCreated('.btn-showpop');
+ WebuiPopovers.setDefaultOptions({trigger:'hover'});
});
</script>
</head>
@@ -1148,6 +1148,11 @@
var _hide = function(selector) {
$(selector).webuiPopover('hide');
};
+
+ var _setDefaultOptions = function(options) {
+ defaults = $.extend({}, defaults, options);
+ };
+
var _updateContent = function(selector, content) {
var pop = $(selector).data('plugin_' + pluginName);
if (pop) {
@@ -1195,7 +1200,8 @@
isCreated: _isCreated,
hideAll: _hideAll,
updateContent: _updateContent,
- updateContentAsync: _updateContentAsync
+ updateContentAsync: _updateContentAsync,
+ setDefaultOptions: _setDefaultOptions
};
})();
window.WebuiPopovers = webuiPopovers;
Oops, something went wrong.
@@ -1140,6 +1140,11 @@
var _hide = function(selector) {
$(selector).webuiPopover('hide');
};
+
+ var _setDefaultOptions = function(options) {
+ defaults = $.extend({}, defaults, options);
+ };
+
var _updateContent = function(selector, content) {
var pop = $(selector).data('plugin_' + pluginName);
if (pop) {
@@ -1187,7 +1192,8 @@
isCreated: _isCreated,
hideAll: _hideAll,
updateContent: _updateContent,
- updateContentAsync: _updateContentAsync
+ updateContentAsync: _updateContentAsync,
+ setDefaultOptions: _setDefaultOptions
};
})();
window.WebuiPopovers = webuiPopovers;

0 comments on commit 5e37fea

Please sign in to comment.