samedi 3 juin 2017

My solution to check if the Check Box is checked not working?

I am trying to find if the Check Box is checked or not. I am sure I am writing the write code but it's not working. Following is my code:

@Html.CheckBoxFor(m => m.Country, new { id = "country" })

And my JavaScript Code:

$(document).ready(function () {

  if ($("#country").is(":checked"))
  {
     alert("Working");
  }

});




Aucun commentaire:

Enregistrer un commentaire