1

According to the bootstrap-growl options documentation we can use placement options to stick the growl notifications elsewhere. I'm trying to put my growl notifications bottom left, but it's not working.

Here's what I'm trying to do:

$(document).ready(function () {
    $.growl({
        message: 'Test.'
    }, {
        placement: {
            from: "bottom",
            align: "left"
        },
        delay: 1000000
    });
});
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-growl/1.0.6/bootstrap-growl.min.js"></script>

The options are being parsed it seems: the delay option is honored. So are others if I add them. However, the placement remains at its default top/right position.

I'm using bootstrap-growl version 1.0.6. Version 2 seems to be in the making but not released yet. Perhaps part of my problem is that the bootstrap-growl website's documentation is aimed at V2?

What am I missing here? Probably something obvious...

TylerH
  • 20,799
  • 66
  • 75
  • 101
Jeroen
  • 60,696
  • 40
  • 206
  • 339
  • Please do not use the file found on cdnjs 1.0.6 this is a mix between my plugin and another. – Robert E. McIntosh Jan 26 '15 at 13:48
  • @RobertE.McIntosh Oh wew, that's confusing! Did you contact the folk from CDNJS about that yet? In any case, could you suggest an edit to the question with a better link, that still reproduces the issue? – Jeroen Jan 26 '15 at 14:22
  • Yeah, I know it is confusing if you check out my [github](https://github.com/mouse0270/bootstrap-growl#thinking-of-a-rename) page you'll notice I am renaming my plugin to help resolve this problem. I sent them a message today, because I hadn't noticed this was in issue until recently. – Robert E. McIntosh Jan 26 '15 at 15:02
  • The worst thing is I am not sure what they are going to do about it though. If they just pull my version out it will break any ones site who is using it. I would really hate to break people's site because of a very understandable confusion. haha. – Robert E. McIntosh Jan 26 '15 at 15:04

1 Answers1

1

Use position instead, like this:

$(document).ready(function () {
    $.growl({
        message: 'Test.'
    }, {
        position: {
            from: "bottom",
            align: "left"
        },
        delay: 1000000
    });
});
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-growl/1.0.6/bootstrap-growl.min.js"></script>

If you check the 1.0.6 release's options documentation on GitHub you'll see that the relevant option is not (yet) called "placement" but (still) called "position". Some other options seem to be different too.

Jeroen
  • 60,696
  • 40
  • 206
  • 339
rnrneverdies
  • 15,243
  • 9
  • 65
  • 95