2012-03-08, 04:10 AM
So i have this template content loaded from the MyBB header template
and for a particular page I want to remove this portion of the output, so I have a JS file that contains
but it does not work. Other lines in the JS file that are coded similarly work just fine but use wrapInner rather than the InnerHTML method.
Basically I want the <div> with id="random_quote" to have it's content removed to result in
nevermind, I had to go about it the long way
<div class="tborder" id="random_quote">
<div class="thead"><a href="{$mybb->settings['bburl']}/Thread-The-Random-Quote-Thread">
<strong>Random Quotes</strong></a>
<div class="expcolimage">
<img src="{$mybb->settings['bburl']}/images/carpe-noctem/collapse.gif" id="quotes_col" class="expander" alt="[-]" title="[-]" style="cursor: pointer; ">
</div>
</div>
<p id="quotes"></p>
</div>
and for a particular page I want to remove this portion of the output, so I have a JS file that contains
$('random_quote').innerHTMl = ' ';
but it does not work. Other lines in the JS file that are coded similarly work just fine but use wrapInner rather than the InnerHTML method.
Basically I want the <div> with id="random_quote" to have it's content removed to result in
<div class="tborder" id="random_quote">
</div>
nevermind, I had to go about it the long way
var randomElement=document.getElementById('random_quote'),randomHTML=randomElement.innerHTML;(function(){randomElement.innerHTML="";})();