-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
  • 5,377
  • 12
  • 50
  • 56
Salman Iqbal
  • 422
  • 5
  • 20

1 Answers1

-1

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

Ralph David Abernathy
  • 4,879
  • 9
  • 47
  • 72