Click here to Skip to main content
16,021,417 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
XML
<div id="abc" style="display: block;" >
these div should not be loaded on page load,but should be loaded after a click
</div>
<a href="" onclick="document.getElementById('mydiv2… == 'none'">Load a div</a>




Is there any code to block the browser to not to load a particular div..and after an external click it load that div.
Posted

1 solution

why don't you set the css property of the div to Display:none and make it visible on click event of the button using JQuery?

It is easy, isn't it?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900