I try to append some data to a dom element using both
$("#slider-hide").append("some text");
and even
document.getElementById("slider-hide").innerHTML += "some text";
but the text is not visible until i perform a browser search for it and once i perform the search it is permanently visible …
It is not a css issue
I have tested in both chrome and safari and it gives me the same issues.
heres the full function
$("#expand").click(
function()
{
$("#right_arrow").hide();
$("#left_arrow").hide();
var ht = document.getElementById('graph-div').offsetHeight;
$("#graph-div").animate({height:ht*numberOfSlides},"slow");
currentPosition = 0;
$("#energy_tag").html(orders_arr[currentPosition]);
$(".highcharts-legend").hide();
var item1 = $("#business-chart").html();
$("#slider-hide").append("fasfdsafdsafdsafdsfdsafdsafdsafdsafds");
document.getElementById("slider-hide").innerHTML += "some text";
}
);
EDIT:
Here’s the concerned html div
<div class="content_boundary" style="background-color:#e3e3e3" >
<h2 style="text-align:center;font-size:20px;" id="energy_tag" class="tab_first_col">Energy</h2>
<div style="position:relative;" id="graph-div">
<a href="#" class="control" id="left_arrow">
<img src="stylesheets/images/arrow_side_normal_left.png" style="position:absolute;top:100px;left:10px;"></img>
</a>
<div class="slider-hide" id="slider-hide">
<div id="business-chart" class="orders-by-busines"> </div>
<div id="business-chart1" class="orders-by-busines"> </div>
<div id="business-chart2" class="orders-by-busines"> </div>
<div id="business-chart3" class="orders-by-busines"> </div>
<div id="business-chart4" class="orders-by-busines"> </div>
<div id="business-chart5" class="orders-by-busines"> </div>
</div>
<div class="clear"></div>
<a href="#" class="control" id="right_arrow">
<img src="stylesheets/images/arrow_side_normal_right.png" style="position:absolute;right:10px;top:100px;" ></img>
</a>
</div>
Screen shot

Working code: http://jsfiddle.net/wPdWF
When I first ran your code I was getting undeclared variable errors on
numberOfSlidesandorders_arr. The exact lines it errors on are:$("#energy_tag").html(orders_arr[currentPosition]);When I declared test values for those two variables the append code was working fine. Where do you declare the above variables in your code?