I have the following code
$(function() {
$('#totalRecords').css('visibility', 'hidden');
alert("hi");
});
Problem is that it doesnt hide my drop down which is
<span id="lblCodes" class="pol" style="top:4;left:209;">Codes</span>
<span id="totalRecords" class="pol" style="top:4;left:350;visibility:visible;">
<select id="startRecord" >
<option value="0"></option>
</select>
</span>
Is there a method for parent() or something. I thought jquery would just select from id. I see alert(“hi”) prompt but the dropdown doesnt get hidden
thanks
did you not mean
You seem to have the wrong id in your selector for the dropdown. Also, visibility and display are quite different. Unless you want the hidden dropdown to still occupy the space, you’ll want to use
displayinstead ofvisibility