I have these 3 functions currently used in the html page:
$('#windowPanel1:first-child').children('div:eq(0)').click(function(){
$('#edit1').val("1");
});
$('#windowPanel1:first-child').children('div:eq(1)').click(function(){
$('#edit1').val("2");
});
$('#windowPanel1:first-child').children('div:eq(2)').click(function(){
$('#edit1').val("3");
});
I would like to have one function that covers all these functions. What would be the most efficient way? Thank!
source
share