Draggable item Harlowe 3.2.1

Please specify version and format if asking for help, or apply optional tags above:
Twine Version: 2
Story Format: Harlowe 3.2.1

Hello,

I am trying to create a draggable item for my story and every time I try to do it, twine tells me that .draggable is not a function… what can I do ? (I am using jQuery)
help

The <jqueryelement>.draggable() function is part of the jQuery UI addon library, and Harlowe only includes a version of the core jQuery library, which is why you are seeing that error message.

You would need to download jQuery UI library and paste a copy of the contents of (at least) the supplied jquery-ui.min.js and jquery-ui.min.css files into your project’s Story JavaScript and Story Stylesheet areas respectively. You would then need to modify the JavaScript you copied to be wrapped within closure like the one described here before it will load successfully.

Now comes the possibly impossible part…

Harlowe has been deliberately designed by it’s Developer to limit an Author’s ability to use JavaScript to extend the functionality of their project, and this has become more so with the recent v3.2.x releases. So while it is possible to use some JavaScript within a project I don’t know if that extends to using jQuery UI library features.

Maybe someone else has had more experience with combining jQuery UI’s draggable functionality with the new Harlowe v3.2.x releases.

1 Like

thank you, I will try that !