Tooltip on image click

72 views
Skip to first unread message

elliot hesp

unread,
Oct 3, 2012, 2:39:36 PM10/3/12
to mootool...@googlegroups.com
Hey there,

So I'm working on something; basically its a list of gaming servers and at the end of each row in the table I have an image, where the user can click to make a popup box, where they can copy the server ip:port of the server.


As you can see, the image for it does nothing.

Using MooTools, what would be the best way to tackle this? I would ideally love just a popup box, where the text is pre-highlighted and the user can hit "ctrl c" and they're done.  I have looked around, I dont think a tooltip would work. however I cant think of anything else, apart from a hidden div that has a set location for each row to show its self... but again, whats the best way to do this in MooTools.

Cheers.

Philip Thompson

unread,
Oct 3, 2012, 6:23:06 PM10/3/12
to mootool...@googlegroups.com
Several options.

1. Use some prebuilt modal+popup window classes. Search the Mootools Forge (http://mootools.net/forge/) or consider Clientcide's stickywin (http://dev.clientcide.com/).
2. Consider using twitter's bootstrap, which has some convenient out of the box functionality with popups. You'll need Aaron's MT bootstrap to make it work with MT (http://anutron.github.com/mootools-bootstrap/)
3. Just create a div on the fly with a textarea in it. When the link is clicked, populate the appropriate data into the textarea so the user can copy it. Reveal the div and allow the user to hide it.

Obviously #3 would be more work on your side - so I recommend finding a tool that someone else has already created (e.g., in the Forge) to make your life just a little easier.

Hopefully that helps,
~Philip
Reply all
Reply to author
Forward
0 new messages