クリックすると上に移動する必要がある上部のナビゲーション バーがあります。
var foo = false
$(document).ready(function(){
$(".topBar").click(function(){
findOut();
});
});
function up()
{
$(".topBar").animate({height:5},"slow");
}
function down()
{
$(".topBar").animate({height:30},"slow");
}
function findOut()
{
if (foo===true)
{
down();
up = false;
}
elseif (foo===false)
{
up();
up = true;
}
}
質問する前に、はい、jQuery ファイルをインストールしています。
これが私のウェブサイトです:learntc.net 一番上のバー。