title: Jquery fullcalendar dayclick event creation
body: <p>So I am attempting to use fullcalendar's dayclick to trigger a popup that can be used to save the event to a database. The event will then be able to be viewed in the fullcalendar's calendar view. My current javascript for the popup is:</p>
  
  <pre><code>dayClick: function (start, end, allDay) {
      $(".popup").show(); // show's pop up
      $(".title").focus(); // auto focus on the field
      var start = Date.parse(start) / 1000; // parse the start time to retain value
      var end = Date.parse(end) / 1000; // same but with end
      $(".submitForm").click(function () { // on submission
          var title = $(".title").val(); // gets title value
          if (title != "") { // if the title exists run script
              $.post("insertscript.php", { title: title, start: start, end: end, allDay: allDay }, // be sure to filter data 
              function () {
                  $(".title").val(""); // clear title field
                  start = ""; // clear start time
                  end = ""; // clear end time
                  calendar.fullCalendar('unselect');
                  calendar.fullCalendar('refetchEvents');
              });
          }
          $(".popup").hide(); // hide pop up box
      });
  },
  </code></pre>
  
  <p>I know ajax is probably the best route for saving the event but have yet to figure out how to work it properly. Any help is appreciated thank you for your time.</p>