javascript - hiding one div tag hides others -


when hide "div1title", other divs hiding. there can solve issue?

<div id="div1title" style="visibility: visible;display:inline">   <table class="htmlrtabledata" style="width:1000px">     <tr>       <td style="width:20px">         <img id="div1plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div1', event, this)">       </td>       <td id="div1titletext"></td>     </tr>   </table>   <div>     <div id="div2title" style="visibility: visible;display:inline;">       <table class="htmlrtabledata" style="width:1000px">         <tr>           <td style="width:20px">             <img id="div2plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div2', event, this)">           </td>           <td id="div2titletext"></td>         </tr>       </table>       <div> 

my js:

document.getelementbyid("div1title").style.display = "none";   document.getelementbyid("div1title").style.visibili‌​ty = "hidden" 

closing div tags should work. nesting second div accident.

<div id="div1title" style="visibility: visible;display:inline">   <table class="htmlrtabledata" style="width:1000px">     <tr>       <td style="width:20px">         <img id="div1plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div1', event, this)">       </td>       <td id="div1titletext"></td>     </tr>   </table> </div><!-- here --> <div id="div2title" style="visibility: visible;display:inline;">   <table class="htmlrtabledata" style="width:1000px">     <tr>       <td style="width:20px">         <img id="div2plus" src="images/plus.jpg" width="20px" height="20px" onclick="onclicksubreport('div2', event, this)">       </td>       <td id="div2titletext"></td>     </tr>   </table> </div> 

Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -