how do i retrieve dom array in .on() event?
for example
- <script type="text/javascript">
$().ready(function(){
$('input').on('change',{name:'Lcb'} , ShowMessage);
function ShowMessage(MyEvent) {
alert(MyEvent.data.name);
}
});
</script>
</head>
<body>
<input type="text" value="1" id="test[]"/>
<input type="text" value="2" id="test[]"/>
<input type="text" value="3" id="test[]"/>
<input type="text" value="4" id="test[]"/>
<input type="text" value="5" id="test[]"/>
</body>
</html>
how do i get array index of trigger object?