3

I am using a little show and hide logic.

I am looking to show a pay button, But only once a "package type" is selected.

I just cannot seem to get this to work.

My HTML Code is as follows...

<label class="checkbox inline">
  <img src="http://local.halo-smart/assets/img/icons/icon-package-one.png">
  <input type="radio" title="69" value="package1" name="bikes[]1" 
                      class="radio-price"> 
</label>

How can I check against this being selected?

Thanks in advance.

The Hungry Dictator
  • 3,444
  • 5
  • 37
  • 53
StuBlackett
  • 3,789
  • 15
  • 68
  • 113

1 Answers1

3

use :checked selector

$("input[name='bikes[]1']").is(':checked')

The above code will return true if the radio button is selected and vice versa.

Rajaprabhu Aravindasamy
  • 66,513
  • 17
  • 101
  • 130