kam_685 kam_685 - 1 year ago 83
Ajax Question

open pop-up box when open page

i have code bu ajax like this :

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

$(".open_popup").colorbox({width:"580px", inline:true, href:"#subscribe_popup"});


this is pop up box, i need when open page open this pop up, to open this pop up i use this code

<a href="#" class="open_popup">Click here to open the popup</a>

how can open pop-up onload tag on body.

Answer Source

If you are trying to load inline content (#subscribe_popup), you should use html property, not href.

From Colorbox documentation:


As the other answer suggests, use it inside $(window).load()

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download