MyBB Community Forums

Full Version: Directable Image With Tooltip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I am trying to create a MyCode so I can have tooltip without breaking image's directability.

By directable I mean when you add url to that image, I want user to be directed to that url when user clicks on image.

I have this replacement in my MyCode currently :
<a><img src="$2" alt="Image" title="$1" /></a>

With this way, I can write tooltip (title) to image, people see it when they hover mouse.
But with this, when you add url code to that image, image doesn't direct to that page as it's supposed to. 
Then I tried this replacement

<a href="javascript:void(0)" onClick="window.open('$2')"><img src="$3" alt="Image" title="$1" /> </a>

And instead of using url, I tried to add link to code, like this :
[imgx a=(tooltip) b=(url to page)]image[/imgx]

But it didn't work either.
What should I do?