Javascript examples for jQuery Method and Property:bind
Trigger a click event on bind
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.1.js"></script> </head> <body> <ul id="jsddm"> <li id="vehicle">Vehicle</li> </ul> <script type="text/javascript"> function openVehicleMenu() {//from w ww .jav a2 s.co m console.log('openVehicleMenu'); } $('#jsddm > #vehicle').bind('click', openVehicleMenu); </script> </body> </html>