0

This is my Fiddle. I added CSS component from Segmented Control and added relevant libraries, but doesn't work as intended, like in the web site:

<div class="segmented-control">
... Control components...
</div>
<div class="card">
... control content
 </div>
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Ashok Kumar Sahoo
  • 580
  • 3
  • 8
  • 24

1 Answers1

3

You are going to need to check out the Getting Started page, and read through it.

The segments don't work in the jsFiddle because they only responde to "touch" events (like on a mobile device) and not "click" events (like on a PC).

From the GitHub - Ratchet documentation.

Ratchet is designed to respond to touch events from a mobile device. In order to use mouse click events (for desktop browsing and testing), you have a few options: Enable touch event emulation in Chrome (found in the overrides tab in the web inspector preferences) Use a JavaScript library like fingerblast.js to emulate touch events (ideally only loaded from desktop devices)

Also, some of the styles are missing for a few reasons.

  • The component examples have extra styling that is not in the framework.
  • Your jsFiddle is missing a <div class="content"> wrapper.
  • This jsFiddle is closer, but still won't fully work because of the touch event issue from above, but at least it points you in the right direction.
Schmalzy
  • 17,044
  • 7
  • 46
  • 47
  • I was wondering how it works in my phonegap app, but I cant test it properly locally, works as intended with chrome's mobile emulation mode but there are some rendering issues. – Ashok Kumar Sahoo May 22 '14 at 04:57