// sample solution to panel.js
$(document).ready(function(){
var $panel = $("#panel");
var $tab = $("#tab");
$tab.click(function(){
//alert("tab clicked");
console.log("tab clicked");
var isShown = ($panel.css("top")==="0px");
//alert(isShown);
var newTop = (isShown) ? "-180px": "0px";
//alert(newTop);
$panel.css("top",newTop);
});
});
No comments:
Post a Comment