Strange - in my chrome, firefox, safari it works - the location is global property - e.g. You can simply use the jQuery prop() method to change the text of the buttons built using the HTML element, whereas to change the text of the buttons which are created using the