Re: django_bootstrap_icons: change icon on click

2021-07-16 Thread Fab
Yea that's how I'd handle it. On Friday, 16 July 2021 at 08:55:51 UTC+1 wester...@gmail.com wrote: > This seems to work. > > function change_btn(objButton) > { >

Re: django_bootstrap_icons: change icon on click

2021-07-16 Thread Fab
Try: var btnUp = "{% bs_icon 'chevron-up' %}"; var btnDown = "{% bs_icon 'chevron-down' %}"; You want double quotes different to the inner single quotes. On Friday, 16 July 2021 at 08:36:07 UTC+1 wester...@gmail.com wrote: > I have this working, but not yet with {% bs_icon 'chevron-down' %} an

Re: django_bootstrap_icons: change icon on click

2021-07-16 Thread Arno Schuurs
This seems to work. function change_btn(objButton) { var btnval = objButton.innerHTML; var

Re: django_bootstrap_icons: change icon on click

2021-07-16 Thread Arno Schuurs
I have this working, but not yet with {% bs_icon 'chevron-down' %} and {% bs_icon 'chevron-down' %} function change_btn(objButton) {

Re: django_bootstrap_icons: change icon on click

2021-07-15 Thread Fab
Hi Arno, You will have to change the buttons value (its text) with Javascript. In the change_bnt() function you can change the button's value with: document.getElementById("CollapseBtn").value="something"; You could toggle the value depending on what the value already is: if (value == 'a') valu