How can I get the text of a nav item when it's clicked and also the text should replace the previous text of nav item? In javascript
Something like this?
$("#nav-id").click(function(){ $(this).text("new text"); });