Title: Validatebox Tooltip does not work with bootstrap 3 Post by: rockccf on June 22, 2015, 01:26:42 AM Hi,
I am testing the sample code below and encountered error. $.extend($.fn.validatebox.defaults.rules, { minLength: { validator: function(value, param){ return value.length >= param[0]; }, message: 'Please enter at least {0} characters.' } }); <input class="easyui-validatebox" data-options="validType:'minLength[5]'"> The box will turn red however the tooltip does not show. Uncaught TypeError: data[option] is not a function(anonymous function) @ bootstrap.js:1700 m.extend.each @ jquery-1.11.1.min.js:2 m.fn.m.each @ jquery-1.11.1.min.js:2 Plugin @ bootstrap.js:1693 _447 @ bundle-bundle_jqeasyui_head.js:6089 (anonymous function) @ bundle-bundle_jqeasyui_head.js:6051 From bootstrap.js: function Plugin(option) { return this.each(function () { var $this = $(this) var data = $this.data('bs.tooltip') var options = typeof option == 'object' && option if (!data && /destroy|hide/.test(option)) return if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) if (typeof option == 'string') data[option]() --------------> Line 1700 }) } The line if (typeof option == 'string') data[option]() is the one giving problems. Any idea to solve this? Thanks. Title: Re: Validatebox Tooltip does not work with bootstrap 3 Post by: jarry on June 22, 2015, 08:19:17 AM Don't use these two 'tooltip' plugins together. If you really want, please include the 'jquery.easyui.min.js' file after 'bootstrap.js' file.
Code: <script type="text/javascript" src="../../bootstrap/js/bootstrap.js"></script> Title: Re: Validatebox Tooltip does not work with bootstrap 3 Post by: rockccf on June 30, 2015, 01:42:49 AM Thanks.
It works. |