How to make with twitter bootstrap tabs on hover instead of clicking?

前端 未结 6 1869
盖世英雄少女心
盖世英雄少女心 2021-01-31 18:36

I finally got Bootstrap tabs to work. I was wondering if there\'s a way to change the behaviour so instead of clicking just hovering the cursor would show the hidden content?

6条回答
  •  醉话见心
    2021-01-31 19:33

    Right from my production code. Orthogonal, unobtrusive, can "unclick" any user interface. Selector can be modified to match many kinds of clickables.

    $(document).on('mouseover','.js-mouseover-to-click',function (event) {
        $(event.target).trigger('click');
    });
    

提交回复
热议问题