tags:

views:

65

answers:

5

i have a div that starts out hidden:

<div id='deskView' style="display: none;">

how can i make it visible using jquery on a button click ?

+1  A: 

You can look at the API.

http://api.jquery.com/show/

jpabluz
+! i love docu refs!! it's like googeling :)
Andreas Niedermair
It's what should be done in the first place. =)
jpabluz
+1  A: 
$('#deskview').show();
dnagirl
+1  A: 
$('#button_id').click(function() {
  $('#deskView').show();
});

Anyway - this is a good place to look for further information: http://docs.jquery.com/Main_Page

rATRIJS
A: 
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){

  $('#myButton').click(function(){
    $('#deskView').show();
  });

});
</script>

<div id="deskView" style="display: none;">
  desk  view
</div>

<input type="button" value="Click Me" id="myButton" />

Go through the Tutorials -- it's worth it.

artlung
A: 
<input type="button" value="Click" id="Button1" onClick="$('#deskView').show()" />
TeknoSeyfo