2

I have created a simple example of using Simon Tabor's "jquery-toggles" plugin (https://github.com/simontabor/jquery-toggles). And although it works, the graphics never show up. I confirmed the CSS and JS is loading fine, yet still no images. Can someone figure out why?

<html>
  <head>
    <link rel="stylesheet" href="/include/jquery-toggles-master/themes/toggles-light.css">
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
    <script src="/include/jquery-toggles-master/toggles.min.js"></script>
    <script>
      $(document).ready(function () {
        $('.toggle').toggles();
        });
    </script>
  </head>
  <body>
    <div class="toggle toggle-select" data-type="select"></div>
  </body>
</html>
4

1 回答 1

5

You need to wrap your toggle with the proper theme.

<div class="toggle-light">
  <div class="toggle toggle-select" data-type="select"></div>
</div>

Example: http://jsbin.com/okupof/2/edit

If you view the source of http://simontabor.com/labs/toggles/ then you'll see more examples in <div class="themes">

于 2013-03-15T02:41:42.680 回答