#rl_modals.myclass not working

Search
Other Bug Reports questions
Forum

#rl_modals.myclass not working

may2's Avatar may2
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.
Peter van Westen's Avatar Peter van Westen ADMIN
I have no idea what you are referring to...
Is this custom javascript you are talking about?
How is this a bug with Modals itself?
Please post a rating at the Joomla! Extensions Directory
may2's Avatar may2
I try to be more clear:

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)
Peter van Westen's Avatar Peter van Westen ADMIN
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.
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
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.
Please post a rating at the Joomla! Extensions Directory
may2's Avatar may2
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.
Peter van Westen's Avatar Peter van Westen ADMIN
See my explanation in the previous reply.
This is not a bug report.
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in