vast-eng/jquery-popup-overlay — pull request #12 by digitalagua (2013-11-13 18:08:26+00:00)
Title: Update jquery.popupoverlay.js

$el was referring to the wrapper element in the callback function.

The cp in the return referred to
'.my_modal_wrapper_open[data-popup-order="2"]' where it should return
'.my_modal_open[data-popup-order="2"]'

I updated the code to pass the original JavaScript element and use that id.

var callback = function(func, clickplace) {
var cp = $('.' + $el.attr('id') + options.opensufix + '[data-popup-order="' + clickplace + '"]');
if (typeof func == 'function') {
func(cp);
}
};

var callback = function(el, func, clickplace) {
var cp = $('.' + el.id + options.opensufix + '[data-popup-order="' + clickplace + '"]');
if (typeof func == 'function') {
func(cp);
}
};