jQuery. How to get ID of clicked element




When I wanted to get the ID of clickable element using jQuery, I have found out that I don't remmember such a simple thing. I had to look for it. And I've found it 🙂

I had buttons with class "phonebtnCall" and some IDs. I wanted to know which of buttons was clicked.

 

 



MarkiMarta.com. Notes of web-specialist
Since 2009
18+
How to change css styles of elements using jQuery

Sometimes when you work with jQuery,  you want to change css-style of elements. There are two common ways to do...

Close