I would like the titles inside my toolbar to be clickable links. I can bury the markup inside the title attribute, but then that messes it up as an actual title (though most tables don't strictly need clean title attributes):
As you can see, that's not a well-formatted title attribute. The other option I've gone with thus far is to render the page, and then on document ready, find tables and grab the link from a "data-link" attribute I've created. Then I traverse the DOM to find the title in the toolbar and wrap it up with an anchor tag and HREF set to the data-link value.
(grab the value of data-link, hunt down the title, and wrap it up in an appropriate anchor tag)
It works, but I feel like there must be a better way. DT is already building the toolbar DOM nodes, so I wonder if there's a way to specify this behaviour within DT itself. Any advice out there?
<table title="<a href='foo.jsp'>Foo</a>">etc..</table>
As you can see, that's not a well-formatted title attribute. The other option I've gone with thus far is to render the page, and then on document ready, find tables and grab the link from a "data-link" attribute I've created. Then I traverse the DOM to find the title in the toolbar and wrap it up with an anchor tag and HREF set to the data-link value.
<table title="foo" data-link="foo.jsp">etc..</table>
(grab the value of data-link, hunt down the title, and wrap it up in an appropriate anchor tag)
It works, but I feel like there must be a better way. DT is already building the toolbar DOM nodes, so I wonder if there's a way to specify this behaviour within DT itself. Any advice out there?