I’ve got a simple HTML form and for some reason jQuery cannot find the element I’m looking for.
HTML:
<form id="form">
<fieldset>
<table>
<tr class="row">
<td class="label">Street</td>
<td class="field"><input type="text" size="50" value="" id="s.street"></td>
</tr>
</table>
</fieldset>
<fieldset>
<tr class="row">
<td class="label">Street</td>
<td class="field"><input type="text" size="50" value="" id="b.street"></td>
</tr>
</table>
</fieldset>
</form>
jQuery :
$(document).ready(
function() {
$("input[id='s.street']").keyup(function() {
$('#b.street').val($(this).val());
});
});
I get no errors in the console log.
from here: What are valid values for the id attribute in HTML? it looks like jquery has trouble with ids that have periods and colons. so try removing those and see if it works.