Authored by Sarah

MFP based modal for text content (jQuery plugin)

JQ plugin providing a thin wrapper around magnific
for displaying markup (from acf wysiwyg for example) in a modal.

usage (html in the data attr needs to be escaped so showing how that would be done with php) :
<button class="ur-element" 
      data-modal-content="<?php echo esc_html(get_field('ur_wysiwyg')); ?>" 
      data-modal-title="<?php echo esc_html(get_field('ur_title_text')); ?>">
    Click me!
options is an object:
      variant: 'blue-bg',
      contentDataKey : 'modal-content',
       titleDataKey: 'modal-title',
       mainClass : '',
       cpPrefix : 'cp'
modal.js 3.11 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment