diff options
| author | billy gates <[email protected]> | 2012-10-17 21:34:01 -0700 |
|---|---|---|
| committer | billy gates <[email protected]> | 2012-10-17 21:34:01 -0700 |
| commit | 0a3e034891255f31f37adb69c2f01fd5f6d259d1 (patch) | |
| tree | 86daaff803bc17252cb76e7caadb0f9bc8b7eb6c /js/tests | |
| parent | 97bf02d78791c08a7d459d532ca3ce9ec8d457a1 (diff) | |
| parent | 6b017b9bea37629d0ee9bcd99e8e34b91aa3b5c0 (diff) | |
| download | bootstrap-0a3e034891255f31f37adb69c2f01fd5f6d259d1.tar.xz bootstrap-0a3e034891255f31f37adb69c2f01fd5f6d259d1.zip | |
Merge pull request #5524 from martinstein/fix-tooltip-delegate-click
Fix tooltip not working in delegate events on click-trigger
Diffstat (limited to 'js/tests')
| -rw-r--r-- | js/tests/unit/bootstrap-tooltip.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-tooltip.js b/js/tests/unit/bootstrap-tooltip.js index 964ba1ef2..bbdf3ce80 100644 --- a/js/tests/unit/bootstrap-tooltip.js +++ b/js/tests/unit/bootstrap-tooltip.js @@ -142,4 +142,12 @@ $(function () { ok(!$._data(tooltip[0], 'events').mouseover && !$._data(tooltip[0], 'events').mouseout, 'tooltip does not have any events') }) + test("should show tooltip with delegate selector on click", function () { + var div = $('<div><a href="#" rel="tooltip" title="Another tooltip"></a></div>') + var tooltip = div.appendTo('#qunit-fixture') + .tooltip({ selector: 'a[rel=tooltip]', + trigger: 'click' }) + div.find('a').trigger('click') + ok($(".tooltip").is('.fade.in'), 'tooltip is faded in') + }) })
\ No newline at end of file |
