Consider this HTML snippet...

<div style="width:300px;" class="siblings">
    <li id="usaCurrency">Dollar</li>

Is it possible to change the usaCurrency Id to some other id, let's say, americanCurrency? If yes how?

2 Answers
    //This will set the id to 'americanCurrency'
    $("#usaCurrency").attr("id", "americanCurrency");

    //Now you can perform operations on the element using the new id, 
    //for instance, set the color of the element to blue
    $("#americanCurrency").css({"color": "blue", "border": "2px solid blue"});

A preferred option is to use prop() instead of attr()

  $("#usaCurrency").prop("id", "americanCurrency");