My website's mobile site, (http://www.codesrce.com/thedrumcenter) has a very modern and functioning push menu. However, I am looking to make it more user friendly. Can someone please help me tweak my code so that when the user presses on the menu button the menu will open, and also when the user slides the screen to the right to open it, and then once it's open then they slide to the left to close it? Also, when the button is pressed, I would like it to turn to this color, #0099FF, and then when it is closed turn back to gray. Sorry if my wording isn't the best, but I hope you know what I mean. :) I will provide my code so far:
HTML
<div id="Mobile">
<div id="menu">
<ul>
<li><a href="#">Top Brands</a></li>
<li><a href="#">Drums</a></li>
<li><a href="#">Hardware</a></li>
<li><a href="#">Cymbals</a></li>
<li><a href="#">Sticks</a></li>
<li><a href="#">Drum Heads</a></li>
<li><a href="#">Terms of Use</a></li>
<li><a href="#">Affiliations</a></li>
</ul>
</div>
<div id="right">
<div id="Top">
<div id="menubar">
<a id="menubarheader">DrumCenter</a>
<a href="#menu" id="button" class="buttonicon"></a>
<a href="#" id="searchlink" class="searchlink"></a>
</div>
</div>
</div>
</div>
JQuery
$('#button').toggle(
function() {
$('#right').animate({ left: 275}, 'fast', function() {
$('#button');
});
},
function() {
$('#right').animate({ left: 0 }, 'fast', function() {
$('#button');
});
}
);
Any help would be appreciated, as I am a complete NOOB at Javascript and JQuery. Thank you!