I\'m new to jQuery and javascript in general but am plugging my way through thanks to sites like these.
I have a page with six hidden divs that are called with correspon
Having your ids it might be like this:
$.each([1,2,3,4,5,6], function(_, index) { $('#link' + index).click(function() { $('[id^=panel]').fadeOut('slow', function() { $('#panel' + index).fadeIn('slow'); }); }) })