Hello,

After our intern left, I took over his code. 
I am wondering if it is possible to change the button icon after clicking 
it.

Example:
expand, use a 'chevron-down'
collapse , use a 'chevron-up' 

The code that I have:
{% load django_bootstrap_icons %}
...
<button class="btn btn-sm p-1
                                       {% if lane.type == 'PRE' 
%}btn-outline-dark {%else %} btn-outline-light {% endif %}
                                      small block-collapsebtn"
                                              type="button"
                                              id="CollapseBtn"
                                              data-toggle="collapse"
                                              
data-target="#collapsable-{{block.uuid}}"
                                              aria-expanded="false"
                                              
aria-controls="collapseExample"
                                              onclick="change_btn(this)"
                                      >{% bs_icon 'chevron-down' %}</button>

Could you help out?
Thank you.

Best Regards
Arno Schuurs

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9eb2cf2e-6df0-43bb-9f23-1edbbf87d13fn%40googlegroups.com.

Reply via email to