javascript - Sort unparsable tablesorter date column by unix timestamp -


i need sort jquery tablesorter unix timestamp rather unpredictable displayed date depends upon locale, want try possible solution hidden span can used sort date column.

how can element inserted in front of text or @ beginning of element while retaining existing text contents in containing element?

basic intent

given element:

<td id="mytd">difficult date parse</td> 

i'd turn this:

<td id="mytd">     <span style="display:none">1398019663</span>     difficult date parse </td> 

this looks job html5 data attributes, in :

<td id="mytd" data-sortkey="1398019663">     difficult date parse </td> 

you can , set value of data attributes using data function in jquery.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -