How to hyperlink a TD to local html page?
How to hyperlink a TD to local html page?
Hi,
I'm using datatables with https://www.gyrocode.com/articles/jquery-datatables-alphabetical-search/ plugin.
Alphabet search wont work if we keep any html code between <td> </td>
I wanted to hyperlink every cell to a different html page,
So i added link like this.
<td>
<a href="demo.html" class="myclass" width="100%">demo </a>
</td>
When i alert the cell value it shows out everything (<a href="demo.html" class="myclass" width="100%">demo </a> ) between <td> </td>
How to fix please?
Answers
You could use a jQuery event. It would listen for the click event and then redirect the page.
An alternative, which I would recommend, is that you update the alphabet search to strip out the HTML.
Allan