开发者

orangebox (lightbox) on page load

im not to familiar with jquery or javascript so i have found solutions to s开发者_运维技巧imilar problems but none explain how it works so i can convert it to use my version of a lightbox.

So i want orangebox (jquery plug-in) to load when a new page opens. its for notifying to users that they have successfully submitted a contact form.

here is the link to orangebox http://orangebox.davidpaulhamilton.net

something that could trigger this maybe

    <a href="#thankyou" rel="lightbox" title="ty">Thank You?</a>
<div id="inlineContent" style="display:none">Thank You</div>
</span></div>
</span></div>
<div id="thankyou" style="display:none"> 
    <p>Thank you for contacting us, we will reply soon.
</p> 
    </div> 

thanks guys


If you take a look at the Public Methods you can see how to create a new orangebox: http://orangebox.davidpaulhamilton.net/api.html

$("anchorID").orangebox('create');

Add this code on the page you want to create the orangebox with the div id thankyou.

    $(function(){
      $("#thankyou").orangebox('create');
    });

This is not tested. Let me know if it works.

And just to let you know:

$(function() {

is equivalent to

$("document").ready(function(){

so the orangebox should be created when the document is loaded.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜