On my page, I have two div tags displayed below. Whenever I try to retrieve the value of the itemName element using $('#itemName').val();, it always returns the value of the element in the first div (which is blank). Is there a way to access the value of the itemName element in the second div called facebox using jQuery?
Info Div:
<div id="info" style="display: none;">
<center>
<strong>Name</strong>
<input id="itemName" type="text"/>
<br/>
<br/>
<strong>Price </strong>
<input id="itemPrice" type="text"/>
<br/>
<br/>
</center>
</div>
Facebox Div:
<div id="facebox" style="top: 27.3px; left: 478px; display: none;">
<div class="popup">
<table>
<tbody>
<tr>
</tr>
<tr>
<td class="b"/>
<td class="body">
<div class="content" style="display: block;">
<div id="info" style="">
<center>
<strong>Name</strong>
<input id="itemName" type="text"/>
<br/>
<br/>
<strong>Price </strong>
<input id="itemPrice" type="text"/>
<br/>
<br/>
<input type="button" onclick="updateTab();" value="Add"/>
</center>
</div>
</div>
Thank you.