Hi,
I have a section named "Test" that has Collapsible on true and style "Title & Rounded Border".
On load event of the page i wrote the following javascript:
var sectionID = rbf_getSectionIdByTitle("test");
rbf_setSectionCollapse(sectionID, true);
But it doesn't collapse.
Also i want to expand it on click.
Can anyone help me with this?
Thanks!
Hi Otenzio,
please try the following code:
$(function() { var sectionID = rbf_getSectionIdByTitle("test"); rbf_setSectionCollapse(sectionID, true); });
Your current code is executed as soon as possible, which means that the section you try to collapse probably doesn't exist yet. The code above is a JQuery function, this one will run after the page (and your section) have been loaded.
It doesn't work... i think it has something to do with the style. If i select at style only "Title Bar" is collapsed.
But then how can i expand it?
It should be collapsible if "collapsible" is checked and the style is "Title & Rounded border". Try to put your script component inside a seperate section and put that section on top of every other section. You should also be able to collapse and uncollapse the section on the page where the section is shown.
Hi,
I also tried the above code in both "Title & Rounded Border" and "Title bar" and it was working fine.
Can you check if you have errors in the page? Press (F12) for chrome.
Regards,
Orchid
Hi otenzio,
Just checking if your issue has been fixed? Or do you have any questions related to this?
Thank you.
Regards,
Orchid