I'm just getting down to speed on jQuery, I apologize if this is a rookie bug.
I am trying to get a simple custom trigger to run without success and success. Maybe someone can help help and show me why this is not working.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>jQuery Trigger example</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script> $('#asset1').bind("triggerAssets", function() { alert('Assets'); }); </script> <script> $(document).ready(function(){ $('#asset1').trigger("triggerAssets"); }); </script> </head> <body > <div id="asset1" class="assets" >Asset <table> <tr> <td>Field One: </td> <td><input type="text" name="fieldOne" id="exfieldOne" value=""/></td> </tr> <tr> <td>Field Two: </td> <td><input type="text" name="fieldTwo" id="exfieldTwo" value=""/></td> </tr> <tr> <td>Field Three: </td> <td><input type="text" name="fieldThree" id="exfieldThree" value=""/></td> </tr> </table> </div> <hr> </body> </html>
garyM source share