simpleImageCheck(current version: 0.4)

Radio button examples

Check Box Examples

$('#user').simpleImageCheck({
  image: 'user_unchecked.png',
  imageChecked: 'user.png',
  afterCheck: function(isChecked) {
    if (isChecked) {
      // do something
    }
  }
});
  
<label for='user'>Check user?</label>
<input type='checkbox' id='user' name='user' />
$('#sunny').simpleImageCheck({
  image: 'sun_unchecked.png',
  imageChecked: 'sun.png',
  afterCheck: function(isChecked) {
    if (isChecked) {
      alert('Yes it is!');
    }
  }
});
  
<label for='sunny'>Is it sunny?</label>
<input type='checkbox' id='sunny' name='sunny' checked='checked' />
$('#multiCheck :checkbox').simpleImageCheck({
  image: 'unchecked.png',
  imageChecked: 'check.png'
});

<label for='phone'>Phone</label>
<input type='checkbox' id='phone' name='phone' />
<label for='email'>Email</label>
<input type='checkbox' id='email' name='email' />
<label for='fax'>Fax</label>
<input type='checkbox' id='fax' name='fax' />

Contact me by...

$('#change')
  .simpleImageCheck({
    image: 'user_unchecked.png',
    imageChecked: 'user.png'
  })
  .change(function() {
    var c = 'checked';
    if (!$('#change').is(':checked')) {
      c = 'not ' + c;
    }
    alert('changed! ('+c+')');
  });
  
<label for='user'>Change user?</label>
<input type='checkbox' id='user' name='user' />