0
我有这个功能是从的fancybox ...jQuery的:问题写一个函数
jQuery的
(function ($, F) {
F.transitions.resizeIn = function() {
var previous = F.previous,
current = F.current,
startPos = previous.wrap.stop(true).position(),
endPos = $.extend({opacity : 1}, current.pos);
startPos.width = previous.wrap.width();
startPos.height = previous.wrap.height();
previous.wrap.stop(true).trigger('onReset').remove();
delete endPos.position;
current.inner.hide();
current.wrap.css(startPos).animate(endPos, {
duration : current.nextSpeed,
easing : current.nextEasing,
step : F.transitions.step,
complete : function() {
F._afterZoomIn();
current.inner.fadeIn("fast");
}
});
};
,我想从简单的链接调用它。例如像这样:
HTML
<a class="myFunction" href="#gallery">Click here</a>
有没有人有一个线索如何做到这一点?
我知道它不应该那么困难,但是我的jQuery/Javascript知识非常有限。
编辑:
这个功能目前从这个链接叫:
HTML
<a href="javascript:;">Click here</a>
,我需要摆脱href="javascript:;"
事情。
这看起来很棒,非常感谢! – Tbys
我理解这个问题吗? 还是你想扩展FancyBox与你自己的插件/效果? –
我想从自定义菜单中调用FancyBox(它具有比Fancybox更高的z-index),所以人们不再需要FB自己的导航。 – Tbys