Home » Jquery » Javascript flag with jquery

$(document).ready(function() {

      var flag = true;

      $("#messageDiv").click(function() {

            if (flag == true) {

                  getMessages(offenderCdcNum);

                  flag = false;

            } else {

                  flag = true;

            }

      });

});

Array ( [0] => Jquery )