-4

I am using a radio box with style but I am not getting its value, First I have used simple radio box which was working but I have changed its style now I am not getting its value.

$("body").on('click', '.status_enable', function(event) {
    event.preventDefault(); 

    var enable = $('.status_enable').val();
    console.log(enable);
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="radio red icheck">
    <label>                                                      
        <input type="radio" name="status" onclick="alert('dlfkjdkl')" value="1" class="status_enable" checked>
        Enable
    </label>
</div>
Ivar
  • 6,138
  • 12
  • 49
  • 61
Salman Iqbal
  • 442
  • 5
  • 23

1 Answers1

-1

To get the value of your checkbox, just do $(.status_enable).val();

Ralph David Abernathy
  • 5,230
  • 11
  • 51
  • 78