jquery-pluginsmagnific-popupmodalpopups

How to show title below modal in magnific popup


I am opening an MVC view in magnific I need to show a title (caption) below the modal But caption is only for image type but I am using Ajax type. I have set the title attribute on both the hyperlink that I click to open the modal and the root element of the view.

But it never shows up. How do I do display the title (fixed or dynamic from a grid)? I wonder why author forgot to add this feature?

hyperlink:

<a class="edit-list" title="Edit List!" href="/manage/editlist/100">Edit</a>

Root element of the target page:

<form id="ListEditForm" class="white-popup" title="Edit List" action="/manage/EditList/100">
 ..fields go here
</form>

I followed this post, but he has markup, I don't: http://codepen.io/dimsemenov/pen/zjtbr

Initialization:

$('.edit-list').magnificPopup({                
                type: 'ajax',
                midClick: true, 
                callbacks: {                    
                    markupParse: function (template, values, item) {
                        values.title = item.el.attr('title'); 
                    }
                }
            });      

Solution

  • This has been solved. I need to put the right container in the right place to render the title. The plugin won't drop any element to show the title.