JQuery: using .LIVE problems
- by TeddTedd
I have the following JQuery code:
$("#myDIV li:eq(0)").live('click',function(){ funcA(); });
$("#myDIV li:eq(1)").live('click',function(){ funcB(); });
$("#myDIV li:eq(2)").live('click',function(){ funcC(); });
$("#myDIV li:eq(3)").live('click',function(){ funcD(); });
And realized it's really inefficient.
So I tried the following, which I…