Edit in JSFiddle

$(document).ready(function () { 
    $('.showPassword').on('change', function () {
        var cache = $(this).parent().next();
        if (cache.attr('type') == 'text') {
            cache.attr('type', 'password')
        } else {
            cache.attr('type', 'text')
        }
    });
})
<div class="form-group">
    <label class="col-md-4 control-label" for="password">Password</label>
    <div class="col-md-4">
        <div class="input-group"> <span class="input-group-addon">     
          <input type="checkbox" class="showPassword"> <label> Show</label>     
      </span>

            <input id="password" name="password" class="form-control" type="password" placeholder="" required="">
        </div>
    </div>
</div>