Skip to main content
11 events
when toggle format what by license comment
Jan 8, 2020 at 1:50 comment added TryHarder You can always test this by opening firefox developer tools and then pasting it into the console. If it works then something else on the page is interfering (Chrome, etc will have similar developer tools).
Dec 15, 2018 at 20:11 comment added Mythic It looks like mickmack's first link will help, just have to sort it out.The way I have it set up there are also 2 toggles, one for the comments themselves and one for replies. This method only opens the top level comments, the reply level comments may open and close as well but you can't see them because the replies toggle is closed. Passing a variable to php for the comment id could let me do a query and get the parent id to also open that other toggle for replies to open on click as well.
Dec 15, 2018 at 19:39 comment added Mythic Sorry I haven't accepted the answer yet because it does indeed open the bootstrap collapse, but it should also stay open. I feel like this is half of the answer. I'm thinking I need to put a condition around the div where the collapse selection ("collapse" or "collapse in") appears and somehow have the js pass the fragment to the php, then have the php run a separate div code when the comment ids line up.
Dec 14, 2018 at 4:57 comment added Mythic Can't do that or they all just stay open. Does seem like something is overriding it at the end though. Tried finding a place where it would be last to run, but no such luck yet.
Dec 14, 2018 at 3:10 comment added mickmackusa @Mythic I suppose rather than changing the attribute value, you could remove the class so that it "doesn't get pickup again" by another js function. (if this answer was helpful to you, please upvote; if it resolves your issue, please accept)
Dec 13, 2018 at 23:09 comment added Mythic I got it working, but it only opens the toggle for a few seconds and then immediately it closes again.
Dec 13, 2018 at 21:08 comment added Sharky This is JavaScript code. You can add it to your template (either inline or in a .js file) or to layout override. Or load it with a plugin. Related documentation: docs.joomla.org/J3.x:Adding_JavaScript_and_CSS_to_the_page and docs.joomla.org/Adding_JavaScript.
Dec 13, 2018 at 16:23 comment added Mythic Where would that go? Keep getting errors anyplace I put it.
Dec 13, 2018 at 8:48 history undeleted Sharky
Dec 13, 2018 at 8:48 history deleted Sharky via Vote
Dec 13, 2018 at 8:47 history answered Sharky CC BY-SA 4.0