How to ignore html elements in anchor tag

How to ignore html elements in anchor tag

TimTTimT Posts: 2Questions: 1Answers: 0

In the following column, I would like the filter search to only consider "Louisville" and to ignore "Kentucky" (Which is only "visible" to the user when the popover link is clicked.) My problem is that if I filter for "Ken" (as in Kenny), the following row will still show even though the only "data" I want considered is "Louisville":

<td>
<a href="#"
data-toggle="popover"
data-html="true"
title="<b>State:</b>"
data-content="<b>Kentucky<b>">Louisville
</a>
</td>

Answers

  • colincolin Posts: 11,280Questions: 0Answers: 1,927

    This example from this thread should get you going!

    Colin

  • TimTTimT Posts: 2Questions: 1Answers: 0

    I've tried this without success. Is there additional information you may need to provide further assistance?

  • kthorngrenkthorngren Posts: 12,250Questions: 25Answers: 2,867

    You will need to take the example that Colin posted and work with it a bit to extract the data you want. Something like this:
    http://live.datatables.net/wehejaba/1/edit

    I created a cell with the above td you provided. Its not the most elegant solution and may not always work with your data. You may be able to workout a regex expression to pull just the data you want. Use console.log statements or the browser's debugger inside the columns.render function to debug what is happening with the regex, etc.

    Also you will want to read up on orthogonal data. My example extracts Louisville for all operations except display.

    Kevin

Sign In or Register to comment.