The selected or highlighted text is in a span with a class which is highlighted. edit: If i click a button i need the name of the span classjson id Datatable pagination and Scroller JQuery failing on getting value of textarea .each function on Jquery How do I make an imagemap area clickable with jQuery? In jQuery, you can get elements with CSS class name and id easily. For example(dividA) selects all div elements that has an id of idA. 2. Class: . classname. [jQuery] get class name. in Using jQuery 11 years ago.Leave a comment on aaron.