Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

JQuery Question(s)

$
0
0
Hi everyone!

When I saw that Sugarcube had jquery support I got really excited, but I'm struggling with what I assume is a simple issue related to not understanding how the story format is implemented. Maybe it's better to just show what I want to do:

https://jqueryui.com/

I want to add this library to my story and then use some of the UI widgets in it!

So... questions:

1) Hey, is this a good idea even? Like will this seriously break anything if I try to do this?
2) If it's fine, where should I add this at or how should I add it so that it doesn't break anything?
3) Maybe more of a sub question but: Is extending Sugarcube this way even a good idea?
4) Do I need to do anything special to use this library once it's installed? Like... do I need to attach jquery handlers in a specific place to make them work?
5) If anyone can point me to a blog post or something where someone has already done something like this: Please do!

I'm pretty handy with Javascript and I've become pretty comfortable with the way that twine/sugarcube processes it within the context of the story, but that's only with code that I write and then specifically attach through either the window namespace or through the documented handlers, so I just really want to make sure that I do things in such a way where I don't reinvent the wheel or make an error in planning that will cause me to have to do a big refactor later if I want to update Sugarcube to a new version.

Thanks!

Viewing all articles
Browse latest Browse all 1844

Trending Articles