私は自分自身を教えているjqueryは、このプロジェクトで作業中に見える。jQuery slideアニメーションをより多くのコンテンツを公開する
私はこの手法を実装する方法が非常に簡単だと思っていましたが、私は運がないと高低を検索しました。ここでは、見ているページがある:3が途中でメニューをプルアップ
http://igs.link-networkonline.com/campaign-landing-page/
は、私たちが見ているものです。彼らはほとんど終了している、私はいくつかのバグを修正するのに役立つ必要があります。
タブが下にスライドすると、タブの下のdivが下にスライドします。それは私がメニューをもっと上げるために否定的なポジショニングを使用しているために最も可能性が高いです...私は他に何をすべきか分かりませんでした!
1つが開いている場合は、別のをクリックすると、最初に閉じます。
これらの質問は非常に近いものであり、ユーザーの期待通りの機能を発揮しておらず、コードがヘッダーに保持されているとかなり嵩張っています。
私が今行っている問題:
a。最初のものが開いているときに最初のものが開いているときは最初のものが閉じられますが、下のdivで使用される負のマージンが大きすぎると、下のdivが上記の内容に干渉します。
b。最初の開閉トグルの後、2回のクリックでトグルし、ページ感覚が壊れます。
更新コード:任意のアイデアや方向のため
$(function() {
$(".first").toggle(function() {
$(".first").animate({'height': '295px', 'top': "-220px"});
$('.first img').attr('src','<?php bloginfo('template_directory'); ?>/images/downarrow.png');
$(".second").animate({'height': '75px', 'top': "0px"});
$(".third").animate({'height': '75px', 'top': "0px"});
$(".campaign-lower").animate({'margin-top': '-220px'});
$(".form").animate({'margin-top': '-220px'});
}, function() {
$(".first").animate({'height': '75px', 'top': "0px", 'overflow': "hidden"});
$('.first img').attr('src','<?php bloginfo('template_directory'); ?>/images/bluebutton.png');
$(".campaign-lower").animate({'margin-top': '0px'})
$(".form").animate({'margin-top': '0px'});
});
$(".second").toggle(function() {
$(".second").animate({'height': '275px', 'top': "-200px"});
$('.second img').attr('src','<?php bloginfo('template_directory'); ?>/images/downarrow.png');
$(".first").animate({'height': '75px', 'top': "0px"});
$(".third").animate({'height': '75px', 'top': "0px"});
$(".campaign-lower").animate({'margin-top': '-200px'});
$(".form").animate({'margin-top': '-200px'});
}, function() {
$(".second").animate({'height': '75px', 'top': "0px"});
$('.second img').attr('src','<?php bloginfo('template_directory'); ?>/images/bluebutton.png');
$(".campaign-lower").animate({'margin-top': '0px'});
$(".form").animate({'margin-top': '0px'});
});
$(".third").toggle(function() {
$(".third").animate({'height': '255px', 'top': "-180px"});
$('.third img').attr('src','<?php bloginfo('template_directory'); ?>/images/downarrow.png');
$(".first").animate({'height': '75px', 'top': "0px"});
$(".second").animate({'height': '75px', 'top': "0px"});
$(".campaign-lower").animate({'margin-top': '-180px'});
$(".form").animate({'margin-top': '-180px'});
}, function() {
$(".third").animate({'height': '75px', 'top': "0px"});
$('.third img').attr('src','<?php bloginfo('template_directory'); ?>/images/bluebutton.png');
$(".campaign-lower").animate({'margin-top': '0px'});
$(".form").animate({'margin-top': '0px'});
});
});
は非常に感謝。あなたの知識を事前におねがいします!
グレート、入力のおかげで。私はリストから#2をチェックしました:) –
#3は '$( '。first img')。attr( 'src'、 'downarrow.png');' ..と# 1 :) – Fabian
ねえ、これはとても近いです!あなたの助けにお返事ありがとうございます。私が抱えている唯一の問題は、もう一方が開いているときに開くと、下のdivが少し上にスライドしてコンテンツボックスに干渉することです。とにかく、第一、第二の遅れと第三の遅れに、あなたが最初にすべてが閉ざされるまで開かないのですか? thanks1 –