This topic is: resolved

Accordion mouse over

  • AvatarCorobori
    Participant
    Post count: 3
    # 4 years, 5 months ago

    Is there anyway to get the according behaving not only on mouse click but on on mouse over ?

    AuthorAuthor
    Keymaster
    Post count: 26666
    # 4 years, 5 months ago
    AvatarCorobori
    Participant
    Post count: 3
    # 4 years, 5 months ago

    I tried it but I couldn’t make it working. See here

    AuthorAuthor
    Keymaster
    Post count: 26666
    # 4 years, 5 months ago

    You have change the class name in the code you used as per the Real Spaces template and need to do some R&D. I will see if i can spare some time for you to help on this. Thanks

    AvatarCorobori
    Participant
    Post count: 3
    # 4 years, 5 months ago

    I did some R&D actually but couldn’t find my way around

    AvatarCorobori
    Participant
    Post count: 3
    # 4 years, 3 months ago

    I fixed it this way

    <script>
    $(function() {
    $(document).on('mouseenter.collapse', '[data-toggle=collapse]', function(e) {
    var $this = $(this),
    href, target = $this.attr('data-target') || e.preventDefault() || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, ''),
    option = $(target).hasClass('in') ? 'hide' : "show";
    $('.accordion-body').not(target).collapse("hide");
    $(target).collapse(option);
    })
    });
    </script>

    AuthorAuthor
    Keymaster
    Post count: 26666
    # 4 years, 3 months ago

    Thanks for sharing your solution with other users. Thanks

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.