hi every 1 i have a problem in my jquery i want this adjust this cods to be able hide the image/text when page open that mean there is nothing appear when i open the page only the button when i click on it the image/text appear that what i want how can help me?
<html>
<head>
<script type="text/javascript">
function show_menu(id){
document.getElementById(id).style.display = "block";
}
function hide_menu(id){
document.getElementById(id).style.display = "none";
}
</script>
</head>
<body>
<button onclick="if (document.getElementById('idOfDiv').style.display=='none') show_menu('idOfDiv'); else hide_menu('idOfDiv');">Show/Hide</button>
<div id="idOfDiv">
<img src="http://mybroadband.co.za/photos/data/500/apple-logo.jpg"/>
text text text text text text text text text....</div>
</body>
</html>
Using jQuery this can be done in one function: