diff options
author | Johann-S <johann.servoire@gmail.com> | 2017-08-24 23:22:02 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2019-02-20 23:05:45 +0300 |
commit | 44f38e41280c12b5bfb25ad1134a9a9f83c23786 (patch) | |
tree | 89a5aeaeda374f1043abe2c7114550e4afd73e8e /js/tests/visual/carousel.html | |
parent | c5595e5b67f24a2112afacd27d670dc2fda95f43 (diff) |
Rewrite carousel without jquery
Diffstat (limited to 'js/tests/visual/carousel.html')
-rw-r--r-- | js/tests/visual/carousel.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/js/tests/visual/carousel.html b/js/tests/visual/carousel.html index d1376b39b9..aa6c5e4c71 100644 --- a/js/tests/visual/carousel.html +++ b/js/tests/visual/carousel.html @@ -47,18 +47,22 @@ <script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script> <script src="../../dist/dom/eventHandler.js"></script> + <script src="../../dist/dom/selectorEngine.js"></script> + <script src="../../dist/dom/data.js"></script> <script src="../../dist/util.js"></script> <script src="../../dist/carousel.js"></script> <script> $(function() { var t0, t1; + var carousel = SelectorEngine.find('#carousel-example-generic') // Test to show that the carousel doesn't slide when the current tab isn't visible // Test to show that transition-duration can be changed with css - $('#carousel-example-generic').on('slid.bs.carousel', function(event) { + EventHandler.on(carousel, 'slid.bs.carousel', function (event) { t1 = performance.now() console.log('transition-duration took' + (t1 - t0) + 'ms, slid at ', event.timeStamp) - }).on('slide.bs.carousel', function() { + }) + EventHandler.on(carousel, 'slide.bs.carousel', function () { t0 = performance.now() }) }) |