I've a situation where a user need to copy (click copy-to-clipboard icon) a link, however I've multiple dynamic links on a single page.
I've found the solution on the following post but I don't know a way to pass clicked icon ID to function as parameter and get the link copied to clipboard.
Click button copy to clipboard using jQuery
<a href="sourcefile.php"><i class="fa fa-link pull-right" id"copyToClipboard1"></i></a>
<a href="anotherfile.php"><i class="fa fa-link pull-right" id"copyToClipboard2"></i></a>
<a href="someimageURL"><i class="fa fa-link pull-right" id"copyToClipboard3"></i></a>
I went through the following post here in order to pass element ids to the function but no use as I just started crawling on jQuery path.
jQuery passing element ID into jquery statement?
Thanks in advance.
I don't have enough rep point therefore posting a new question [duplicate].