rdusnr

Untitled

Aug 12th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. add_shortcode('custom_popup_container','custom_popup_container');
  2. function custom_popup_container($atts, $content = '') {
  3.  
  4. $content = do_shortcode($content);
  5. $output = '';
  6. $output = '<a class="btn with-icon btn-default open-popup-link" href=""><i class="icon-desktop"></i>Open pop-up</a>';
  7. $output .= '<div id="show-in-popup" class="mfp-hide">';
  8. $output .= $content;
  9. $output .= '</div>';
  10.  
  11. return $output;
  12. }
  13.  
  14. /* The JS */
  15.  
  16. <script>
  17. jQuery('.open-popup-link').magnificPopup({
  18. items: {
  19. src: '#show-in-popup',
  20. type: 'inline',
  21. },
  22. preloader: false,
  23. mainClass: 'kleo-mfp-zoom',
  24. });
  25. </script>
Advertisement
Add Comment
Please, Sign In to add comment