このNextLevelSearchのように、jqueryでアニメーション化された検索フォームを作成しました。検索フォームを開いてページを更新しても、これが閉じないようにしたいと思います。どうすればこれを達成できますか?
私は試してみましたが、うまくe.preventDefault();
いきreturn false;
ません。それは私の問題とは何の関係もないことを私は知っています。
これは私のコードです:
$globalsearch_submit.click(function(){
$('#stat').hide();
$('.wrapper-simple').animate({'width':'275px'})
.end().find('.wrapper-simple input[type=text]').css({opacity: 0, visibility: "visible"}).animate({'width': '231px', opacity: 1})
.end().find('.wrapper-simple .button').animate({ 'right': '40px' })
.end().find('.wrapper-simple input[type=submit]').animate({'marginLeft':'235px', opacity: 1}, 10)
return false;
});
$('.wrapper-simple input[type=submit]').click(function() {
$('#stat').show();
$('#stat').delay(500).css('opacity',0).show().animate({opacity:1},100);
$('.wrapper-simple').animate({'width':'40px'})
.end().find('.wrapper-simple input[type=text]').animate({'width': '1px', opacity: 0})
.end().find('.wrapper-simple .button').animate({ 'right': '0' })
.end().find('.wrapper-simple input[type=submit]').animate({'marginLeft':'0', opacity: 0}).attr('value', '');
return false;
});
助けてください!ありがとうございました。
(英語が下手でごめんなさい)