Tagged: javascript
-
AuthorPosts
-
February 24, 2014 at 1:52 am #228272
Hi,
I’ve created a sidebar button to link to a leadpages opt-in javascript popup, but am not sure how to make this work.
Here is the button that I’ve created using the default editor:
[av_button label='Join Us' link='manually,https://my.leadpages.net/leadbox/147205173f72a2%3A148906d4eb46dc/5643440998055936/' link_target='blank' color='custom' custom_bg='#ee3a09' custom_font='#ffffff' size='small' position='center' icon_select='no' icon='ue800' font='entypo-fontello']
However, I am not sure how to get it to work with the pop-up properly, as I need to add in this javascript piece so that when I click on the button above it’ll have a javascript pop-up that overlays the site instead of going to a new page:
<script type=”text/javascript” src=”//my.leadpages.net/leadbox-680.js”></script>
I’m not sure how this is possible within the shortcode.
Thanks for your help!
February 24, 2014 at 2:48 am #228295Hey vchemko!
You can also use the lightbox feature. Please refer to this link. Use the inline content or external sites feature.
http://www.no-margin-for-errors.com/projects/prettyPhoto-jquery-lightbox-clone/
Cheers!
IsmaelFebruary 24, 2014 at 2:52 am #228296Thanks, Ismael. Is there no way then to just add in that javascript code within the shortcode? I would prefer to do that if possible since everything is already there and looking like I need to and I have all plugins already available, but if not I’ll look into this additional step using prettyPhoto for a lightbox.
Thanks!
February 25, 2014 at 3:10 am #228805Hi!
You would need to enque the script into your site as a new function in the functions.php. See: http://codex.wordpress.org/Function_Reference/wp_enqueue_script
That will make sure it gets included correctly with WordPress.
Regards,
Devin -
AuthorPosts
- You must be logged in to reply to this topic.
