Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

JQuery Issues

Hi. I'm back again with another stupid question.

I'm trying to incorporate a slider bar into my Twine story, but due to on incompetence or inexperience, I am unable to actually get the darn thing working. I'm pretty sure I have the jQuery code placed in the correct place (the Stylesheet), I just cannot for the life of me figure out how to get it to show up in my passages.

This is the code I am using.
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>slider demo</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css">
  <style>#slider { margin: 10px; }	</style>
  <script src="//code.jquery.com/jquery-1.12.4.js"></script>
  <script src="//code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
</head>
<body>
 
<div id="slider"></div>
 
<script>
$( "#slider" ).slider();
max: 50
</script>
 
</body>
</html>

Also, how do I ensure that this sets a variable.

Many thanks.

Comments

  • I don't know exactly what you're looking for in a slider, but I'd suggest trying the <<numberpool>> macro set from SugarCube 2's website (under: Downloads > Add-ons), which includes a slider macro, before continuing on your present course.
  • Beautiful. I had no idea that was included in the numberpool macro. Thanks again.
Sign In or Register to comment.