I mocked up some HTML to test this:
<input type="text" id="text" />
<select id="options">
<option>one</option>
<option>one</option>
<option>one</option>
<option>one</option>
<option>one</option>
<option>one</option>
<option>one</option>
<option>one</option>
</select>
I was using the following JavaScript to alert the type of the select tag, but I kept getting false.
var elem = $("#text");
alert(elem.after().attr('id'));
I also tried using Jquery's prop()
method but to no avail, I am just trying to check whether the element that follows the input tag is a select tag...