Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Lightbox Ultimate – Automatically popup content on page load
- This topic has 3 replies, 2 voices, and was last updated 12 years, 7 months ago by wpCommerce.
-
AuthorPosts
-
April 18, 2012 at 4:10 pm #6114cicakMember
Hi-
I know what I’m asking is in the grey area of the user agreement but other lightbox plugins seem to have the option to auto activate upon page load (and therefore function as a popup) and I really think that other users would like to know how to do this (assuming I’m not missing any obvious settings or other information). There seems to be an option for this with regards to Youtube video embeds but not for html elements. I’ve done some hunting online and I know that Javascript is needed to automate the clicking of the link upon page load but I can’t seem to get it to work. Any small help you could offer would not only help me but I’m sure others would find it useful too.
Here is the html element as its entered into my WP site (the link/pop works when clicked manually
[wp_lightbox_anchor_text_inline_html_overlay div_id="letter" text="letter"]
<div id="letter" class="lightbox_ultimate_fp_overlay" style="width:640px;height:480px;"><p>To whom it may concern,</p>
<p>To protect sensitive information and deter spammers, you need to register to access the information beyond the initial welcome page. The process is simple.</p></div>This isn’t the entire letter contained in the div but I’m sure you get the point.
Now, I’ve pasted the following script right above this div which (as I understand it) is targeting the link class. The development tools in safari are telling me that the link class is “wp_lightbox_html_overlay_trigger”
<script type="text/javascript">
$(document).ready(function () {
$('a.wp_lightbox_html_overlay_trigger').first().trigger('click');
});
</script>This script doesn’t seem to work. I have entered it while in HTML mode in WP so I’m not sure where to go from here. Any help or nudges in the right direction would be appreciated.
.
April 19, 2012 at 10:45 am #44210wpCommerceModeratorHi, the code you are trying to use is good for a standalone HTML page. But it will not work if you have multiple plugins that use JavaScript.
Anyway, we have added a new shortcode to popup inline content. Instructions for using the shortcode can be found here:
April 20, 2012 at 10:04 am #44211cicakMemberAgain, Tip and tricks proves itself to have outstanding customer service. Thank you immensely. Once I get my primary site up and running I’d be happy to advertise for you.
One small issue which I’m sure is easily resolved. I tried the following code as outlined in the PDF you linked to above
[wp_lightbox_ultimate_inline_content_embed div_id="letter" anchor_type="text" title="letter" text="Letter" auto_popup="true"]
<div id="letter" style="width:640px;height:480px;"><p>To whom it may concern,</p></div>Perhaps I’m doing something wrong but this shortcode doesn’t seem to function. Do I need to download the plugin again for the new shortcode to work?
April 21, 2012 at 12:28 am #44212wpCommerceModeratorYes, you will need a new build for that functionality. Please do the following:
1. Deactivate and delete the currently installed version of the plugin(s).
2. Download a fresh build of the plugin(s) from here:
https://support.tipsandtricks-hq.com/update-request
3. Upload and activate this version of the plugin(s).
-
AuthorPosts
- You must be logged in to reply to this topic.