Simple switchClass Question

Simple switchClass Question

I have many images that I wish to have the class switched when they are clicked. Since there are many I do not want to write the function for each image. I am trying to write a function to take a class as an input and switch that class to another, but so far it isn't working. Anyone know where I'm messing up?

  1. $(document).ready(function()
    {
       
        $(".bubble1").click(bubbleDown("bubble1"));
        $(".bubble2").click(bubbleDown("bubble2"));
        $(".bubble3").click(bubbleDown("bubble3"));
        $(".bubble4").click(bubbleDown("bubble4"));
        $(".bubble5").click(bubbleDown("bubble5"));
        function bubbleDown(X)
        {
            $(this).switchClass(X, "bigbubble", 1000);
        }
       
    });












Thanks!