using JQuery plugin(noty)
Hello everyone,
I have included files in my webpage as follows:
- <script src="http://code.jquery.com/jquery-2.0.0.js"></script>
- <script src="http://code.jquery.com/jquery-migrate-1.1.1.js"></script>
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
- <script type="text/javascript" src="js/noty/jquery.noty.js"></script>
- <script type="text/javascript" src="js/noty/layouts/top.js"></script>
- <script type="text/javascript" src="js/noty/layouts/topLeft.js"></script>
- <script type="text/javascript" src="js/noty/layouts/topRight.js"></script>
- <script type="text/javascript" src="js/noty/themes/default.js"></script>
Now,suppose on button click,i want to make alert then i am calling this as follows:
- <asp:Button ID="btnalert" runat="server" Text="Click this..!" />
For this to work,i have included below piece of code:
- <script type="text/javascript">
- $(document).ready(function() {
- $("#btnalert").click(function() {
- var n = noty({ text: 'This is what i want as alert!' });
- });
- });
- </script>
After doing all this,nothing happens when i click the button. Any help in this regard?
Further, is it possible to have one function and i can pass just alert text to that function? I appreciate valuable suggestions on following:
1) How to get above code working?
2) Common steps to apply any JQuery plugin into our existing application.