Thread Starter
pilote
(@pilote)
Well I make some progress in this question..
not 100% perfect but now I can put a button inside a popup to open another popup
how it work (example for 2 popup):
1: create the 2 popup in the same page
– popup-1 as normal
– popup-2 inside a div with an unique id to trigger later
– in css this div is hidden ( #my-id{display:none} )
2: the button for popup-2 inside popup-1
<button type="button" name="my-id"
class="new-trigger">clickme</button>
3: and the .js for my button
$('.new-trigger').on('click',
function(e){
$btn_name = $(this).prop("name");
$el = $("#" + $btn_name + " .cl-popup-trigger");
if ($($el).length ) {$el.trigger( "click" );}
return false;
});
now a click in .new-trigger open my second popup on top of the first one ; it’s cool but for a real “popup chain”, I would like to close popup-1 before opening popup-2 (and close 2 before opening 3 and so on) but couldn’t find how to do that.
Hello pilote,
As you noticed, at the moment the plugin itself doesn’t allow to create popups inside of other popups.
Anyway, I’m glad that you managed to find solution yourself! Hope this will help other CodeLights users too!