jquery - select hidden input in div, unable to find; however source shows input tag in div -
this page looks like
<div id="divid"> <input type="hidden" id="hidden1" value="value1" /> <input type="hidden" id="hidden2" value="value2" /> <bunch of other tags> </div>
when $("#divid").find("input#hidden1").val()
i'm getting undefined. when $(":input#hidden1").val()
i'm getting value1
investigating further, $("#divid").html()
returns hidden inputs not in sight.
i can confirm input tags inside div.
update input fields getting moved out of div , head of page reason.
moving input fields bottom of div kept them wandering , allowed me functionality looking for.
as far how or why happening, haven't foggiest idea. issue occured ie 8.0.6.
if can point me sort of bug report issue or explain how and/or why i'll accept answer.
if .html()
call returns no inner elements well, seems they're either not think, or being added later.
- check first markup valid here: http://validator.w3.org/
- also make sure aren't being added dynamically later, after current code running.
Comments
Post a Comment