Home › Forums › JavaScript › Please help improve this simple jquery › Re: Please help improve this simple jquery
May 1, 2012 at 7:03 am
#102063
SgtLegend
Member
It could probably get as simple as
$(function() {
// Hide some stuff!
$('#searchTable, #addlink').hide();
// Loop through the "#addlink" and #searchlink" elements
$.each(, function() {
// Bind a click handler to the current element
$(document.body).delegate('click', this, function() {
// Toggle the following elements
$('#searchTable, #addTable, #searchlink, #addlink').toggle(0);
});
});
});