Skip to main content

jQuery

warning

Listening to alphaTab via DOM events has been deprecated in 1.5 and will be removed in 2.x.

jQuery used to be, and is still, a big player in the Web Development world. For alphaTab we decided that it is not worth to have a dedicated alphaTab jQuery plugin anymore as the AlphaTabApi object already provides an easy-to-use interface making jQuery an unnecessary overhead to maintain.

We recommend migrating all codebases to standard modern JavaScript and our API object.

For historical reference this page describes some aspects on how to use the alphaTab jQuery plugin but avoid using it for new developments.

To initialize alphaTab on any element use jQuery('.selector').alphaTab(). With alphaTab initialized you can either access the API object via jQuery('.selector').alphaTab('api') or use a subset of the API surface. Parameters and return values can be passed accordingly. For properties, if no value is provided, the current value is loaded, if one is provided it is set.

Additionally you can subscribe to alphaTab events via the jQuery event listener mechanisms: