1
내 프로젝트에서이 라이브러리를 사용하고 있습니다 : jQuery Tools Tabs 그리고 내가 읽은 것부터 기본 사용자가 아닌 내 사용자 지정 효과를 만들 수 있습니다.jQuery 도구 탭 사용자 지정 애니메이션
나는이 효과를 내기로했습니다 : Demo. 비슷할 수도있는 것을 발견했지만 구현하는 데 문제가 있습니다.
$.tools.tabs.addEffect("subFade", function(tabIndex, done) {
var conf = this.getConf(),
speed = conf.fadeOutSpeed,
panes = this.getPanes();
var $tab = this.getCurrentTab();
if($tab.hasClass("current")){//Going AWAY from the tab, do hide animation (before the tab is hidden)
$(".tabs-tab").animate({"left" : "0px"}, 300, function(){//I was sliding it behind the tabs when not in use, replace with your own animation
panes.hide();
panes.eq(tabIndex).fadeIn(200, done);
console.log("Done done");
//This is then end of the chain - my animation, hide all then fade in new tab.
});
} else {//going away from any other tab
panes.hide();
panes.eq(tabIndex).fadeIn(200, done);
}
$tab = this.getTabs().eq(tabIndex);
if($tab.hasClass("current")){//Going to my special tab.
$(".tabs-tab").animate({"left" : "-160px"}, 300);//Sliding it out
}
// the supplied callback must be called after the effect has finished its job
done.call();
});
위의 내용은 제가 시도했지만 성공하지 못한 것입니다. 그래서 내가 뭘 잘못하고 있는지 알면 궁금 해서요. 그 맞춤 효과를 데모처럼 작동시킬 수 있을까요?
감사합니다,하지만 난 종류의를 처리하기 위해 jQuery를 도구에 의존하고있어, 나는 사용자 정의 영향을 미칠 수있는 가능성이 (이 이유가 의미 : 그래서 이 문제를 jQuery 도구 탭에서 구현할 수있는 해결 방법이 있습니까? – Roland
불행히도 jQuery 도구를 직접 사용한 적이 없으므로 죄송합니다. 죄송합니다. ( –
문제가 없습니다. 내 플러그인 효과 맞춤화 (: – Roland