新しいjQueryを作成するdivをアニメーション化するコードを左手側から右手側にスライダダウンしてしまいました。スライダダウン前のdivの高さは約10pxになり、スライダダウンは351pxになります。 私は上記を個別に行うことができますが、組み合わせることはできません!少しガイダンスをありがとう、ありがとう。 これは私の現在のコードです。divをアニメーション化してスライダダウンした
$.hideAllExcept = function(tabs,boxes){
function init() {
// make it bookmarkable/refreshable. but, no history.
var hash = window.location.hash;
(!hash) ? hideShow('#' + $(boxes+':first').attr('id')) : hideShow(window.location.hash);
// add click handler.
$(tabs).click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
// add back the hash which is prevented by e.preventDefault()
window.location.hash = href;
hideShow(href);
});
}
function hideShow(el) {
$(boxes).animate({"left": "-650px"}, "slow");
$(el).fadeIn('slow').animate({"left" : "60%",height:"351" }, 1000);
$(tabs).removeClass('active');
$('a[href="' + el + '"]').addClass('active');
}
init();
};
は少し進歩を遂げました! 私はそれが一時サーバー上で実行されているんだ:
http://www.tridentsolutions.co.nz/test-folder/index.html#construction_home
しかし、テキストはHTMLであるように私は、また、テキストが表示されているかを確認LHSに戻るには、ボックスを取得することはできませんし、 divのイメージではなく、テキストを隠すことができないということですか?事前に おかげ
(function($){
$.hideAllExcept = function(tabs,boxes){
function init() {
// make it bookmarkable/refreshable. but, no history.
var hash = window.location.hash;
(!hash) ? hideShow('#' + $(boxes+':first').attr('id')) : hideShow(window.location.hash);
// add click handler.
$(tabs).click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
// add back the hash which is prevented by e.preventDefault()
window.location.hash = href;
hideShow(href);
});
}
function hideShow(el) {
$(el).animate({"left": "-650px"}, "slow").fadeIn('slow');
$(el).fadeIn('slow').animate({"left" : "60%" }, 1000).animate({"height" : "351" }, 1000);
$(tabs).removeClass('active');
$('a[href="' + el + '"]').addClass('active');
}
init();
};
を申し訳ありませんが、ちょうどこの作業を取得することはできません。 – gofer
どのようなコードを試しましたか?それは何ですか? –
返信いただきありがとうございます、 – gofer