# Adding the data-toggle attribute to the BB button module

**URL:** <https://community.wpbeaverbuilder.com/t/adding-the-data-toggle-attribute-to-the-bb-button-module/11144>\
**Category:** Beaver Builder\
**Created:** [February 21, 2020, 7:21pm UTC](https://community.wpbeaverbuilder.com/t/adding-the-data-toggle-attribute-to-the-bb-button-module/11144 "2020-02-21T19:21:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lawrence](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/lawrence/32/1835_2.png) [@Lawrence](https://community.wpbeaverbuilder.com/u/Lawrence)\
**Post date:** [February 21, 2020, 7:21pm UTC](https://community.wpbeaverbuilder.com/t/adding-the-data-toggle-attribute-to-the-bb-button-module/11144/1 "2020-02-21T19:21:35Z")

</div>

Hello all!

I’m wondering, is it possible to add attributes to the Beaver Builder button module?

I’m using the Bootstrap Modals plugin and it uses the data-toggle attribute to trigger the modal window.

I could do this with an HTML module as well but I like using the button module and wanted to see if it’s possible and what it would take.

Thanks in advance,

Lawrence

---

<div class="post-metadata">

**Author:** ![pross](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/pross/32/883_2.png) [@pross](https://community.wpbeaverbuilder.com/u/pross)\
**Post date:** [February 21, 2020, 8:57pm UTC](https://community.wpbeaverbuilder.com/t/adding-the-data-toggle-attribute-to-the-bb-button-module/11144/2 "2020-02-21T20:57:41Z")

</div>

Similar question and answer here

> [@Add download attribute to a button](https://community.wpbeaverbuilder.com/t/add-download-attribute-to-a-button/10226):
>
> Assuming you’ve added download as a custom class for the button module this js will add the attribute to force the download. jQuery(document).ready(function(){ jQuery( ".download a").attr( "download", "download" ); });

Just change it from download to data-toggle

---

<div class="post-metadata">

**Author:** ![Lawrence](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/lawrence/32/1835_2.png) [@Lawrence](https://community.wpbeaverbuilder.com/u/Lawrence)\
**Post date:** [February 23, 2020, 4:27am UTC](https://community.wpbeaverbuilder.com/t/adding-the-data-toggle-attribute-to-the-bb-button-module/11144/3 "2020-02-23T04:27:43Z")

</div>

Sorry. I’m doing a download. I the button to have `data-toggle="modal"` added to the tag so that it triggers code for the modal to open.

Unfortunately I’m not completely understanding your jQuery and how to use that.

---

<div class="post-metadata">

**Author:** ![avanti](https://community.wpbeaverbuilder.com/user_avatar/community.wpbeaverbuilder.com/avanti/32/930_2.png) [@avanti](https://community.wpbeaverbuilder.com/u/avanti)\
**Post date:** [February 23, 2020, 8:27am UTC](https://community.wpbeaverbuilder.com/t/adding-the-data-toggle-attribute-to-the-bb-button-module/11144/4 "2020-02-23T08:27:23Z")

</div>

There is this plugin for BB, it adds a data attribute field to modules: [https://github.com/JasonTheAdams/BBCustomAttributes](https://github.com/JasonTheAdams/BBCustomAttributes)
