Overview

Some interactions are implemented so regularly on webpages (and particularly in admins) that it can be useful to have a consistent and quick workflow around creating them. As you iterate on designs, it can also become important to design that workflow so you can start quick and simple, but progress to highly specific overrides when necessary, without having to rewrite your core over and over again.

Adcom's JavaScript plugins try to give you that minimal workflow framework for common interactions. They provide sensible defaults for you first version of something like an index page or a form, but keep that workflow small enough that you can take over where necessary.

Using multiple JavaScript plugins

You may want to use Adcom JavaScript plugins in conjunction with one another or with Bootstrap's JavaScript plugins, such as having a button trigger both a modal and a form inside. Because both are triggered with overlapping data attributes, you cannot place them both on the same element.

Instead, you can use a wrapper element. Event bubbling will allow both events to fire sequentially.

{% highlight html %} {% endhighlight %}

Extending Bootstrap

The JavaScript plugins (and this documentation) are written in the style of Bootstrap's JavaScript plugins. The general principles that apply to Bootstrap's plugins apply here as well.