Javascript examples for jQuery Method and Property:jQuery Method Example
Changing content of last li element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> <script type="text/javascript"> $(window).load(function(){//ww w. j ava2s.c o m $('li:last').html('Buttermilk'); }); </script> </head> <body> <ul> <li>Coffee</li> <li>Tea</li> <li>Milk</li> </ul> </body> </html>