By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,594 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

binding onclick function

omerbutt
100+
P: 638
hi i am trying to bond an onclick function of jGrowl but it is not working iit was initially used as the document ready function and i am changing it to use it on click here is the code
Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6. <link rel="stylesheet" href="jquery.jgrowl.css" type="text/css"/>
  7. <script type="text/javascript" src="jquery-1.2.6.js"></script>
  8. <script type="text/javascript" src="jquery.ui.all.js"></script>
  9. <script type="text/javascript" src="jquery.jgrowl.js"></script>
  10. <script type="application/javascript">
  11. // In case you don't have firebug...
  12.     if (!window.console || !console.firebug) {
  13.         var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
  14.         window.console = {};
  15.         for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {};
  16.     }
  17.     (function($){
  18.         $("#maker").click(function(){
  19.             $('#test1').jGrowl("Another custom container test.", { 
  20.                 glue: 'before',
  21.                 speed: 2000,
  22.                 easing: 'easeInOutExpo',
  23.                 animateOpen: { 
  24.                     height: "show",
  25.                     width: "show"
  26.                 },
  27.                 animateClose: { 
  28.                     height: "hide",
  29.                     width: "show"
  30.                 }
  31.             });
  32.         });
  33.     })(jQuery);
  34. </script>
  35. </head>
  36.  
  37. <body>
  38.     <a href="javascript:void(0);" onclick="$('#test1').jGrowl('shutdown');">Shutdown jGrowl </a>
  39.     <div id="test1" class="top-left"></div>
  40.     <br/><br/><br/><br/>
  41.     <a href="javascript:void(0);" id="maker">Animate jGrowl</a>
  42. </body>
  43. </html>
  44.  
  45.  
Aug 14 '09 #1

✓ answered by omerbutt

i did it te other way
thanks every 1

Share this Question
Share on Google+
1 Reply


omerbutt
100+
P: 638
i did it te other way
thanks every 1
Aug 14 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.