I need to add some js to a jqm collapsible element to hide an image and then reshow it.
I have tried using a javascript to show and hide, but i have failed and this inline function seems to half way work at least in hiding the image...
<h3><a href="#" id='loadingImage'><img src="images/services_chart_01.jpg" onclick="document.getElementById('loadingImage').style.display='none';"></a></h3>
What i need is the javascript that when the image or the ( + sign) is clicked would then hide the image, and then show the image when the (- sign) is clicked.
I am using the
jqm
collapsible content --
<div id="content_2" class="content2" data-role="collapsible">
<h3><a href="#" id='loadingImage'><img src="images/services_chart_01.jpg" onclick="document.getElementById('loadingImage').style.display='none';"></a></h3>
<p title="Begin Story Two">Lorem ipsum dolor sit amet. Aliquam erat volutpat. Maecenas non tortor nulla, non malesuada velit.</p>
<p>Aliquam erat volutpat. Maecenas non tortor nulla, non malesuada velit. Nullam felis tellus, tristique nec egestas in, luctus sed diam. Suspendisse potenti. </p>
<p>Consectetur adipiscing elit. Nulla consectetur libero consectetur quam consequat nec tincidunt massa feugiat. Donec egestas mi turpis. Fusce adipiscing dui eu metus gravida vel facilisis ligula iaculis. Cras a rhoncus massa. Donec sed purus eget nunc placerat consequat.</p>
</div>