bootstrap-notify icon indicating copy to clipboard operation
bootstrap-notify copied to clipboard

Using plugin inside another function : $.notify undefined

Open Rezrazi opened this issue 8 years ago • 2 comments

When used the plugin this way, it works perfectly

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mouse0270-bootstrap-notify/3.1.7/bootstrap-notify.min.js"></script>
<script>
    $.notify({
        // options
        message: 'Hello World'
    }, {
        // settings
        type: 'danger'
    });
</script>

but I want to define a javascript function that call the plugin, so as to define custom options for notify depending on usage I've been trying this

<script>
    function sendNotification() {
        $.notify({
            // options
            message: 'Hello World'
        }, {
            // settings
            type: 'danger'
        });
    }
</script>

When calling the function from chrome devtools, it throws a $.notify is not defined error

Rezrazi avatar Mar 28 '17 07:03 Rezrazi

can anyone let me know if this will work ..any work around is available

Sidharthan1988 avatar Sep 03 '17 18:09 Sidharthan1988

Very bad, I'm trying to do the same thing and it does not work anywhere. Definitely this is not going to solve, we will have to change plugins.

ramunozp avatar Nov 10 '17 05:11 ramunozp