I have a server query, that queries a minecraft server and displays its status.It stores the ip and the server name in a variable and displays it with jquery in a single loop.
I want the dispalyed server name to be selectable onclick, but whatever i try it doesnt work
the code
$('.servercontainer .serverdata span[rel=\"'+serverarray[i]+'\"]').html(servername[i]);
here servername is the variable which contains the servername, server ip contains the ip and servercontainer is the class of the div that displays all the data.
I want to be able to select the server name when clicked on.
Thanks for reading this
edit:
the servername is what i want selected. When a person clicks on the text, the whole text has to be highlighted so that all he has to do is ctrl+c to copy it.
Sorry for the confusion