Reputation: 8025
I have been trying to figure out how I would be able to make a sliding panel work properly. The sliding portion of the panel is working flawlessly, my problems are:
So basically what I am trying to achieve is:
What I'm having is:
Open webpage -> Panel is already extended.
Click "open" button.
Nothing happens.
Close button does not show, and the panel is untouched. Here is my coding:
HTML Code:
<div id="toggle" style="list-style: none;">
<input id="open" class="open" href="#" type="button" value="Open" />
<input id="close" style="display: none;" class="close" href="#" type="button" value="Close" />
</div>
JQuery:
$(document).ready(function() {
$("#open").click(function(){
$("div#panel").slideDown("slow");
});
$("#close").click(function(){
$("div#panel").slideUp("slow");
});
$("#toggle a").click(function () {
$("#toggle a").toggle();
});
});
I would appreciate any sort of help. Thank you.
Upvotes: 1
Views: 743