How to display image with link in a cell

How to display image with link in a cell

lewisklewisk Posts: 1Questions: 1Answers: 0

I work on a legacy web application which uses DataTables 1.9.4. Some of our tables have an HTML link (anchor tag) in the first column, with an image contained in the link. This is implemented by returning the HTML for the link from the fnRender function. This works; however the same HTML also becomes part of the title attribute for the cell - in more recent browsers, this results in the HTML being displayed in a tooltip when cursor is hovered over the cell.

Clearly this is not the correct way to implement a clickable link/image in a cell - can anyone guide me to the correct approach? I've looked through the documentation at https://legacy.datatables.net/ but I can't find the information I'm looking for. Thanks to anyone who can help!

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Hi @lewisk ,

    That's a very old release, I would suggest updating to the most recent.

    Either way, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.