iCheck Installation

5

I can not do iCheck work

I installed I include the css and js files in my index and even then it does not work the checkboxes and the radiobuttons continue the same thing, can anyone help me please ..

In my head it's like this

<link rel="stylesheet" href="plugins/iCheck/all.css">

And my checkboxes are like this

 <div class="box box-success">
            <div class="box-header">
              <h3 class="box-title">iCheck - Checkbox &amp; Radio Inputs</h3>
            </div>
            <div class="box-body">
              <!-- Minimal style -->

              <!-- checkbox -->
              <div class="form-group">
                <label>
                  <input type="checkbox" class="minimal" checked>
                </label>
                <label>
                  <input type="checkbox" class="minimal">
                </label>
                <label>
                  <input type="checkbox" class="minimal" disabled>
                  Minimal skin checkbox
                </label>
              </div>

              <!-- radio -->
              <div class="form-group">
                <label>
                  <input type="radio" name="r1" class="minimal" checked>
                </label>
                <label>
                  <input type="radio" name="r1" class="minimal">
                </label>
                <label>
                  <input type="radio" name="r1" class="minimal" disabled>
                  Minimal skin radio
                </label>
              </div>

              <!-- Minimal red style -->

              <!-- checkbox -->
              <div class="form-group">
                <label>
                  <input type="checkbox" class="minimal-red" checked>
                </label>
                <label>
                  <input type="checkbox" class="minimal-red">
                </label>
                <label>
                  <input type="checkbox" class="minimal-red" disabled>
                  Minimal red skin checkbox
                </label>
              </div>

              <!-- radio -->
              <div class="form-group">
                <label>
                  <input type="radio" name="r2" class="minimal-red" checked>
                </label>
                <label>
                  <input type="radio" name="r2" class="minimal-red">
                </label>
                <label>
                  <input type="radio" name="r2" class="minimal-red" disabled>
                  Minimal red skin radio
                </label>
              </div>

              <!-- Minimal red style -->

              <!-- checkbox -->
              <div class="form-group">
                <label>
                  <input type="checkbox" class="flat-red" checked>
                </label>
                <label>
                  <input type="checkbox" class="flat-red">
                </label>
                <label>
                  <input type="checkbox" class="flat-red" disabled>
                  Flat green skin checkbox
                </label>
              </div>

              <!-- radio -->
              <div class="form-group">
                <label>
                  <input type="radio" name="r3" class="flat-red" checked>
                </label>
                <label>
                  <input type="radio" name="r3" class="flat-red">
                </label>
                <label>
                  <input type="radio" name="r3" class="flat-red" disabled>
                  Flat green skin radio
                </label>
              </div>
            </div><!-- /.box-body -->
            <div class="box-footer">
              Many more skins available. <a href="http://fronteed.com/iCheck/">Documentation</a>
            </div>
          </div><!-- /.box -->
    
asked by anonymous 20.11.2015 / 20:30

2 answers

0

As informed, the displayed error is:

Uncaught ReferenceError: $ is not defined(anonymous function) @ index.php?mod=info-produto:365 morris.min.js:6 Uncaught Error: Graph container element not found

This is due to the lack of jQuery on the page, below is the example of adding the library:

Put the code below below your tag <title>...</title>

<title>...</title>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
    
21.11.2015 / 00:45
0

Are you initializing iCheck in input ? try this:

<input type="checkbox" class="icheckbox_square-green">

$(document).ready(function(){
  $('.icheckbox_square-green').iCheck({
    checkboxClass: 'icheckbox_square-green'
  });
});
    
21.11.2015 / 14:14