开发者

Auto Load a Link

I have this project that I need a modal box to appear when they login for the first time.

I'm using a class called superbox which works well but it's activated by clicking links with href and rel attributes attached.

So I was wondering if there was a way of auto clicking the link on page load.

开发者_JS百科

This is the link below:

<a href="#testbox" rel="superbox[content][470x225]">Open</a>

Any help would be appreciated,

Thanks.


Okay basically, auto clicking literally doesn't exist. But you can activate the box on pageload.

$(document).ready(function () {
    //alert('page was loaded!');
    SomeSuperBoxOpeningFunction('content', '470x225');
});

EDIT

But since there is no such feature in superbox plugin. Then lets make a totally alternative fix for that:

http://jsfiddle.net/hobobne/8FLkx/

This is a very very simple idea behind showing some boxes.


I checked the sourcecode of your superbox and found the the following function:

function showBox(curSettings, $elt)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜