Orchestra
...
More information
The TypeScript clickable tools library for orxapi


shell
node -v
v6.9.2
`
Installation
`shell
npm install orxapi.plugins.tabs --save
`
$3
* jQuery
$3
The orxapi.tools.clickable is new API, be careful if you update from 1.x.x
The callback method is remove and replace by before method, see use for more information.
$3
This library is written in TypeScript, but you can use JavaScript.
$3
Download the script here and include it (unless you are packaging scripts somehow else):
Standalone: You can use the standalone version into bundle directory. The bundle contains a minimized version of the clickable tools with a Fuse Box Quantum API.
`html
`
Min: If you want use other orxapi tools or plugins choose the min bundle and add external api.
`html
...
`
You access to the methods by the namespace "orxapiToolsClickable" see the exemple JavaScript
$3
Tools Clickable supports npm under the name "orxapi.tools.clickable".
Usage
TypeScript code
`ts
import { initClickable, deleteClickable } from "orxapi.tools.clickable";
// Default clickable
initClickable();
// Special clickable initialize with custom callblack
initClickable({
target: $("#specialWrap"),
selector: ".is-special-clickable",
before: (elem: JQuery, target: JQuery, userdata: IUserDataClickable) => {
console.log(userdata.link);
}
});
// Delete the default clickable event
deleteClickable();
`
JavaScript code
`javascript
(function($) {
// Default clickable
orxapiToolsClickable.initClickable();
// Custom clickable
orxapiToolsClickable.initClickable({
target: $("#customClickable"),
selector: ".is-special-clickable",
before: function(elem, target, userdata) {
if (elem.hasClass("add-link-param")) {
console.log("Update link with custom parameters");
userdata.link = userdata.link + elem.data("addParam");
}
}
});
})(jQuery);
`
HTML code
`html
Orchestra
...
More information