Jquery plugin: Noty [problem]
Hi there,
I want to install the plugin Noty (noty - A jQuery Notification Plugin)
But how can I make it so there will appear a noty when i click on a button? Or when, for example, you're logged in?
I have added this to my head:
PHP Code:
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="plugins/notifications/jquery.noty.js"></script>
<script type="text/javascript" src="plugins/notifications/layouts/top.js"></script>
<script type="text/javascript" src="plugins/notifications/layouts/topLeft.js"></script>
<script type="text/javascript" src="plugins/notifications/layouts/topRight.js"></script>
<!-- You can add more layouts if you want -->
<script type="text/javascript" src="plugins/notifications/themes/default.js"></script>
But what else do I have to do/configurate?
Thanks in advance.
-Galago
Re: Jquery plugin: Noty [problem]
From their website.
Quote:
Creating a notyHi! Layouts Installation Creating a noty Options Custom Container Theme Buttons Callbacks API History
We wrote a helper for creating noty easily. So you can use noty(properties); Just like this;
Returns a noty javascript object. (not jquery dom object, but you can access dom with this object)
var noty = noty({text: 'noty - a jquery notification library!'});
Actually, their entire website explains how to do it..
Re: Jquery plugin: Noty [problem]
Yes, I know that. But how can I trigger it when I click on a button?
Re: Jquery plugin: Noty [problem]
How you trigger any javascript when you click a button I suppose.
Re: Jquery plugin: Noty [problem]
So:
PHP Code:
onclick="javascript:noty();"
?
Re: Jquery plugin: Noty [problem]
Inline js? Isn't that like circle 7 of web dev hell?
Re: Jquery plugin: Noty [problem]
Quote:
Originally Posted by
jMerliN
Inline js? Isn't that like circle 7 of web dev hell?
I dont know? :S