Вопрос

Could anyone give me some help with this please? The content needs to appear after hovering over a second (I tried using hoverIntent but I couldn't get it to work) and it needs to stay open, only closing/sliding back up when the button is clicked.

Here it is on jfiddle http://jsfiddle.net/VDcL4/4/

Это было полезно?

Решение

Like this?

jsfiddle

$(".btn-slide").on('mouseenter click', function(e) {
    switch(e.type) {
        case 'mouseenter':
            $("#panel").stop().slideDown("slow");
            break;
        case 'click':
            $("#panel").stop().slideUp("slow");
            break;
    }
    return false;
});

Другие советы

All you need to do is replace slideToggle slideDown() -

 $(document).ready(function() {
    $(".btn-slide").hover(function() {
        $('#panel').slideDown(1000);
        $(this).addClass("active");
        return false;
    });
});​

Why did you use slideToggle in the first place?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top