Hello, I am new to jQuery; I am trying to write a script that looks for empty fields in a table, and if it finds them to remove the empty <div> elements. The following script works fine on Firefox, but not on IE.
What is the problem? any advise for getting this to work? var fieldName = "#orgPerson0"; content = jQuery.trim($(fieldName + " :eq(3)").text()); if (content == "") { console.log("0. Content is empty"); $(fieldName + " :eq(1)").empty(); $(fieldName + " :eq(2)").empty(); $(fieldName + " :eq(3)").empty(); } else { console.log("0. Not empty: " + content); } ... And a snippet of the XHTML on which the script works: <div id="orgPerson0"> <div id="orgPersonTxt" style="width: 95px; float: left;">Person: </div> <script> WriteValueDiv("orgPersonVal"); </script> <div id="orgPersonVal0" style="position: relative; left: 0px; width: 600px;"> </div> </div>