Is there any way to make the code shorter

I have implemented a JavaScript code in my web site, the code runs to toggle the slide, and there are 15 such slides, so for each I have implemented slide toggle code, but I want to know is there any shorter way such that I write the code once and it gets implemented on all the slides.



I believe this will work on your end.

for (let i = 1; i <= 15; i++) {
  $(".main" + i).click(function(){
    $(".show" + i).slideToggle("slow");