Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_shortcode('custom_popup_container','custom_popup_container');
- function custom_popup_container($atts, $content = '') {
- $content = do_shortcode($content);
- $output = '';
- $output = '<a class="btn with-icon btn-default open-popup-link" href=""><i class="icon-desktop"></i>Open pop-up</a>';
- $output .= '<div id="show-in-popup" class="mfp-hide">';
- $output .= $content;
- $output .= '</div>';
- return $output;
- }
- /* The JS */
- <script>
- jQuery('.open-popup-link').magnificPopup({
- items: {
- src: '#show-in-popup',
- type: 'inline',
- },
- preloader: false,
- mainClass: 'kleo-mfp-zoom',
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment