javascript - Colorbox html from a function -
i have html code
<html> <head> <script type = "text/javascript" src = "https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type = "text/javascript" src = "http://www.jacklmoore.com/colorbox/jquery.colorbox.js"></script> <link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css" /> </head> <body> <div id="bag">click me</div> </body> </html> <script type="text/javascript"> $("#bag").click(function(){ $.colorbox({html:function(){alert("hello")}}); }); </script>
when click on click me, alert pop comes 2 times rather should come once. please tell me
any way here problems code:
$("#bag").click(function{ $("#bag").click(function(){
Comments
Post a Comment