Integrating with other plugins

MaxButtons can be used to trigger functions in many other types of plugins. When clicking a button some special function can be executed or data can be passed to other components of your website. For example, when clicking a button, a popup screen pops up, or a full-screen image.

On this page we will demonstrate which options are most used to accomplish this interconnectivity.

Refer to your plugin documentation. Most but not all plugins have some way to connect with links on your page when this is logical. When searching for documentation looks for keywords like ‘custom link’, ‘triggers’ and such.

Advanced options
MaxButtons PRO advanced options

Almost all connector options can be found under the advanced section in the button editor. Which one to use is determined by the target plugin. If the target plugin doesn’t support any of those, ask the author in what way it should be done.

Rel

This is the classic way a lot of lightbox plugins connect. When a plugin requests this field, simply fill out the ‘custom rel tag’ field with your desired values.

Extra classes

Plugins often offer the option to trigger certain functions when an element has a special class name. Under the field ‘extra classes’ you can enter the extra class. You can add as many classes as you want, just separate them by a space.

Data attributes

Data attributes came with HTML5 and are a newer way of adding extra data to your buttons. You have to fill out both the name and the value. For instance, filling out ‘name’ as name and ‘test’ as value will output as : data-name=”test” . You can add another data attribute to the button by clicking the + (plus) button.

Calling a Javascript function

In general this should be a last resort option, or if you are using custom code and you are comfortable with this method. In the field ‘Javascript Onclick Event’, you can add a function which will be called when the button is clicking. For example, you can enter ‘MyFunction()’ and MaxButtons will try to use that function.

Important: If the javascript function does not exists, this will result in an error and might interfere with your site functions, or stop something from working.