Pergunta

Please view my Sample Fiddle...

There's a notification bar that comes up. When I use this plugin where I got it (here), the plugin works great. There's really no documentation on this and I've gotten it installed and working - half way.

When the notification bar is closed, there's an arrow that's supposed to drop down to re-initiate it with a click. I can see the shadow from the arrow there, but it's not coming down.

Not sure how to make it pull down automatically as the author displays here

This is the script used to call the function...

       $(document).ready(function () {
            $('.notification.ondemand').notify();
            $('.button').click(function () {
                $('.notification').removeClass('hide').addClass('hide').removeClass('visible');
                $('.notification.' + $(this).attr('id') + '').notify({ type: $(this).attr('id') });

            });

        });

The drop-down arrow works on the demo, but not my site.

Can you please take a look?

Thanks,

Foi útil?

Solução

The problem is the site demo where do you get the code; in the site example there is a buttonset with class .button that switch the notify behaviour by using the id of the cicked button:

$('.notification.' + $(this).attr('id') + '').notify({ type: $(this).attr('id') });

You don't have that button so you can use directly your needed notify type.

The possible values for type option are:

  • sticky
  • floated
  • fixed
  • ondemand

Code:

$(document).ready(function () {
    $('.notification.ondemand').notify({ type: 'ondemand' });    
});

Demo: http://jsfiddle.net/IrvinDominin/qYsfD/

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top