I want to know how to make something like this:
example:
<a href="#" id="123">Link</a>
And when I click on it I want to get id=123 with jQuery or something similar.
And then add this id=123 to another div:
Like this
<div class='info'>id=123</div>
Can you help me?
You could subscribe to the
.click()event of all anchors (or narrow them down by using a CSS class selector) and inside this event fetch the id of the anchor that was clicked and use it to set the html of the target div: