How to use Jquery how to change the aria-expanded=”false” part of a dom element (Bootstrap)? May 15, 2023 by Tarik You can use .attr() as a part of however you plan to toggle it: $("button").attr("aria-expanded","true");