mouse0270 / bootstrap-notify

Turns standard Bootstrap alerts into "Growl-like" notifications.
http://bootstrap-notify.remabledesigns.com/
MIT License
2.25k stars 641 forks source link

Notify not showing on keydown #95

Closed wroughtec closed 9 years ago

wroughtec commented 9 years ago

I have a search form that uses ajax to pull in the data and I have disabled the enter key but rather than nothing occuring I wish to setup a notify however when I do so the message does not display unless I scroll.

$('#search').keydown(function(event) {
    if(event.keyCode == 13) {
        $.notify({
            // options
            message: 'message'
        },{
            // settings
            type: 'warning'
        });
        event.preventDefault();
        return false;
    }
});

Is this something I am doing wrong or is this not possible?

mouse0270 commented 9 years ago

This seems to be working for me: http://jsfiddle.net/2s760cp0/1/

wroughtec commented 9 years ago

Weird something must be clashing my end thanks anyway

mouse0270 commented 9 years ago

I would try using .on("keyup", function(event) { ... } instead of .keyup(function(event) { .. } since that is really the only change I made. haha.

If you share a demo URL I might be able to better assist you. If you believe the issue is on your end, please close this issue.

wroughtec commented 9 years ago

It was not a js problem it was a change in the animation css file as I have stuff hidden that is faded in so the hidden on the animated class was not being removed until it becomes visible :+1: Thanks for your help