longlostnick / bootstrap-growl

Pretty simple jQuery plugin that turns standard Bootstrap alerts into "Growl-like" notifications.
http://ifightcrime.github.io/bootstrap-growl
MIT License
806 stars 207 forks source link

bootstrap.js doesn't need to be required #51

Closed ghost closed 9 years ago

ghost commented 10 years ago

I guess you can change a few things in a way that you could use this plugin only with bootstrap.css, whitout bootstrap.js.

I had to change this

if (options.delay > 0)
{
    $alert.delay(options.delay).fadeOut(function()
    {
        return $(this).alert("close");
    });
}

into this

function removeAlert()
{
    $alert.fadeOut(function() {
        return $alert.remove();
    });
}

if (options.delay > 0)
{
    setTimeout(removeAlert, options.delay);
}

$alert.find("[data-dismiss=\"alert\"]").click(removeAlert);

What do you think?

mouse0270 commented 10 years ago

Well this is partly true. You would than have to provide all your own styling since the plugin uses bootstraps alert css.

ghost commented 10 years ago

No, my idea is to require only the bootstrap css, and not the javascript

longlostnick commented 9 years ago

Very nice, but I'd prefer to stick with the bootstrap implementation for now. May decide to revisit at some point though, so thanks.