Hello, when I try to get the "#rl_modals.myclass" div it does not work: ".myclass" is added to the div but the jQuery('#rl_modals.myclass').prependTo('#mydiv') does not; it prepends the "#rl_modals" block even if there is not the ".myclass" specific class.
I created two modals on the same page:
{modal url=""}A{modal}
and another one with specific className="myclass": {modal url="" className="myclass"}B{modal}
The class "myclass" is added in <div id="rl_modals"> tag when I clic B link (as follow: <div id="rl_modals" class="my class">).
So, I want the <div id="rl_modals"></div> block to open inside <div id="mydiv"></div> (instead of <body></body>) JUST when I clic link B, thus, I use jQuery('#rl_modals.myclass').prependTo('#mydiv'), and it get shifted correctly. But it shifts so also when clicking the link A (basically, the the script works regardeless the .myclass specification)
That is because there is no new element being created. The div with id "rl_modals" is created once. Then the contents and classnames are updated.
So you would have to change your custom javascript to move it when it has your custom classname, and move it back when it doesn't.
PS: this is not a bugreport. This is a support request. And even one based on your custom code, not on Modals itself.
I do not provide support on the free version. So if you have any more need for help, purchase a subscription.
I know I have to set the javascript to move it when it has your custom classname, and move it back when it doesn't. Indeed, jQuery('#rl_modals.myclass').prependTo('#mydiv') it supposed to call just the #rl_modals only when there's the class .myclass.
That's the reason why I opened the ticket here.