Append html tag to table header Jquery -
i have kind of tr structure, need juqey add image beside link here structure have
<tr> <th class="k-header" data-role="sortable"><a href="#" class="k-link">one</a></th> <th class="k-header" data-role="sortable"><a href="#" class="k-link">two</a></th> <th class="k-header" data-role="sortable"><a href="#" class="k-link">three</a></th> <th class="k-header" data-role="sortable"><a href="#" class="k-link">four</a></th> <th class="k-header" data-role="sortable"><a href="#" class="k-link">five</a></th> <th class="k-header" data-role="sortable"><a href="#" class="k-link">six</a></th> </tr>
what need inside href add hmtl tag this
<th class="k-header" data-role="sortable"><a href="#" class="k-link">one <p>new link</p></a></th>
i have data attribute can element, how add new tag inside that, tables going ajax, , thing think of, maybe on() or live()
any idea? have :)
$(function() { var target = $('[data-role~=sortable]'); target.live(function() { }); });
just have use append() in jquery
$(".k-link").append("<p>new link</p>");
Comments
Post a Comment