jquery - cross-browser solution for changing content of last li element -
i have following un-ordered list structure
<ul> <li>coffee</li> <li>tea</li> <li>milk</li> </ul>
now, need replace milk buttermilk, how can it, using jquery ofcourse? need solution, works on every browser, starting ie7+
use :last
selector
$('li').filter(':last').text('buttermilk')
Comments
Post a Comment