Javascript modal breaks itself?

The code below opens a modal, and then executes a series of jQuery calls on some form controls. It works. Form submission works. Everything is great EXCEPT.... after you complete the form, or just close the modal, the anchor tags with the requestFeedback class stop responding, which means you can only execute this ONCE. If you refresh the page, all is well again until you click any of the request feedback links that have the requestFeedback class.

Where should I look to figure out what is causing this?

      /* Set the ID */
      var request_id = $(this).data('cid');

      $("#modalRequestFeedback").on('', function(e){
        /* Hook the help link */
        /* Add select2() to the worker select */
          placeholder: "Get feedback from...",
          allowClear: true,

        /* Make the date a calendar. */

        /* Bind the submit button to do some work. */
          var sendTo = JSON.stringify($("#getFeedbackFrom").val());
          var requestor = <?php echo $current_user->users_id; ?>;
          var requirement_id = request_id;
          var ed = tinymce.get('feedbackMesage');
          var message = ed.getContent();
          var due = $("#feedbackDeadline").val();

            url:'<?php echo getHostFQDN(); ?>util/createReviewRequests.php',
              sendTo : sendTo,
              requestor : requestor,
              requirement_id : requirement_id,
              message : message,
              due : due


        /* Add tinymce to the message. */
          toolbar:"undo redo | bold italic | bullist numlist | link unlink",
          plugins: "link,mention",
            delay: 100,
            source: function(query, process)
                  //Do your ajax call
                  $.getJSON('/util/queryMention.php?q=2&pid=76&b=170', function(data) {
                    //call process to show the result


Open in new window

LVL 32
Who is Participating?
DrDamnitAuthor Commented:
Setting the date fixed it:
DrDamnitAuthor Commented:
Additional information:

After I click the button, then close the modal, then click it again, I get this in Firebug:
I also, as a test, removed the $("#modalRequestFeedback").on('', function(e){ ... } section, and tested. The problem went away (of course the form becomes pointless at that point). But, the good news is: I've narrowed it down to that section of the code...
DrDamnitAuthor Commented:
OK, now I've narrowed it down to this line:
If I remove the datetimepicker(), it resolved the problem. So, the question not becomes: how do I fix the datetimepicker() in order to maintain its use?

Perhaps there are options I should use?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.