Home › Forums › JavaScript › Please help improve this simple jquery › Re: Please help improve this simple jquery
May 1, 2012 at 7:43 am
#102066
Mottie
Member
I would do this:
$(function() {
// initially hidden
$('#searchTable, #addlink').hide();
$('#addlink, #searchlink').click(function(){
$('#searchlink, #addTable, #searchTable, #addlink').toggle();
});
});
@SgtLegend: I didn’t think delegate
is really necessary in this case.