I'm making this control toggle between hide
and show
base on the value in this hidden value. I wanted to use a Boolean because I can just do something like == true
. Is this the best way to do this?
Working sample
https://jsfiddle.net/tjmcdevitt/4bdrfgcu/12/
$("#hdMeetingDateId").val(500);
//"#hdMeetingDateId").val(0);
console.log($("#hdMeetingDateId").val());
let hasMeetingDateId = $("#hdMeetingDateId").val() > '1' ;
if (hasMeetingDateId == true) {
$("#displayButton").hide();
} else {
$("#displayButton").show();
}