I'm fairly new to jQuery, but I thought this would be simple enough to add an onClick
function.
But for some reason it's not working. I'm thinking it's something little that I am overlooking. Also, I would like the div-1
to fade in slowly so it doesn't just appear right away.. But for some reason I can't even get the show to work.
Here is my html:
<button id="button-1" style="height: 50px;
width: 50px; background: red;">Click Me!</button>
<div id="div-1" style="height: 400px;
width: 400px; background: blue; visibility: hidden;"></div>
and the jQuery
jQuery('#button-1').onClick(){
jQuery('#div-1').show();
}
Here is a fiddle http://jsfiddle.net/2wsHd/