How to change the element with no ID in jquery?

html, javascript, jquery

Solution

Could use the id of it parent

$("#select1_chzn span").text("Another");

UPDATE

Using > means direct descendant where as a space means descendant not necessarily direct.

Problem

The HTML codes are like this: ``` <div id="select1_chzn" class="chzn-container chzn-container-single" style="width: 250px;"> <a class="chzn-single chzn-single-with-drop" href="javascript:void(0)" tabindex="-1"> <span>AFF5</span> <div></div> </div> ``` I was wondering how I could change the `<span>AFF5</span>` to `<span>Another</span>` in jquery. Does anyone have ideas about this? Thanks!

Original source

Related problems