How can I attach a specific handler for each clicked anchor tag, and then turn off all anchor tags grouped under one div with a class name?
How can I attach a specific handler for each clicked anchor tag, and then turn off all anchor tags grouped under one div with a class name?
<div id="x">
<a id="a">link one</a>
<a id="b">link two</a>
<a id="c">link three</a>
</div>
jquery:
$('#a').on('click touchstart', handlerfuncA );
$('#b').on('click touchstart', handlerfuncB );
$('#c').on('click touchstart', handerfuncC );
$('x').off('click touchstart' );
then reattach all without specifically attaching each anchor again. but how would i easily reattach each handler? i need the handlers to be reattached but was wondering if there was an easy way without specifying attaching every handler again.