Rotate Image Icon On Click

Was wondering if someone can help me with this. I want to be able to click the text/icon, and on click, the + icon rotates 45 degrees to look like a x icon. Upon second click, the icon rotates back to look like a + icon, and so on.