alexmaestro100
asked on
Open fancybox automatically on page load
I have code below to open Fancybox For Wordpress on page load and it's loading but the div cannot display content - just says "The requested content cannot be loaded.
Please try again later." My code (which I'm putting all in the page template) is:
<div id="newsregwrapper">
<div id="newsreg">
...content...
</div>
</div>
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(functio n() {
$j("#newsreg").fancybox(). trigger("c lick");
}); </script>
I know the quirk of FB for WP is you have to surround the targeted div in a wrapper (in this case newsregwrapper) but not sure you need it for this method (only from a link?).
So do I need the wrapper and what is the correct code please...thanks.
Please try again later." My code (which I'm putting all in the page template) is:
<div id="newsregwrapper">
<div id="newsreg">
...content...
</div>
</div>
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(functio
$j("#newsreg").fancybox().
}); </script>
I know the quirk of FB for WP is you have to surround the targeted div in a wrapper (in this case newsregwrapper) but not sure you need it for this method (only from a link?).
So do I need the wrapper and what is the correct code please...thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER