Kurkula
Kurkula

Reputation: 6762

Jquery Show div on Clicking scrollbar

I am trying to hide a div if I click any where on page and not inside the div. But If i click on Scrollbar for that div, I am unable to stop div hiding. What might be the issue?

Here is my fiddle

Expectation: Do not hide div if I move scroll bar.(In Internet explorer)

    var $container = $(".toolbarContent");

//Hide red div if we click out side of the red div
$(document).mouseup(function (e) {
        if (!$container.is(e.target) // if the target of the click isn't the container...
            && $container.has(e.target).length === 0) // ... nor a descendant of the container
        {
            $container.hide("slow");
        }
    });

$('#showDiv').click(function () {
$container.show();
});

Upvotes: 1

Views: 503

Answers (1)

Hbirjand
Hbirjand

Reputation: 1965

I'have tested your example in Chrome and Firefox,and there was no issues,But you have used jQuery 2.0 which is not supported by IE 8,may be that was the cause of the issue here is the browser support details for jQuery 2.0

Upvotes: 1

Related Questions