Home
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function () { $('div:last').append(" - this is last div element"); }); </script> </head> <body> <h1>CSS Selector: div:last</h1> <div>div1</div> <div>div2</div> <div>div3</div> </body> </html>
Result: