Support » Plugin: My Calendar » My Calendar Event popup doesn't close (fix)

  • Resolved Steve


    When you click the X (Close Button) it removes the X but does not close the popup.

    The problem is that WordPress is doing the awesome little wpautop. So on my site this is the html for the popup.

    <div id="mc_1-03-calendar-details" class="details" style="display: block;">
    <p><a href="#mc_1-03-calendar" class="mc-toggle mc-close close"><img src="" alt="Close"></a>
    </p><div class="time-block">
    <p><span class="mc-event-date">July 3, 2014</span><br>
    <span class="event-time dtstart"><time datetime="2014-07-03T10:30:00">10:30 am</time><span class="time-separator"> – </span><time class="end-time dtend" datetime="2014-07-03T15:15:00">3:15 pm</time></span></p></div>
    <div class="location"></div>
    <div class="longdesc">
    <p>test description</p>
    <div class="shortdesc"></div>
    <div class="sharing"></div>

    The javascript used for the close button is in the my-calendar-install.php file.

    // defaults will go into the options table on a new install
    $initial_caljs = '$(function() {
      $(document).on("click", ".calendar-event .event-title",
         function(e) {
             e.preventDefault(); // remove line if you are using a link in the event title
      $(document).on("click", ".calendar-event .close",
         function(e) {

    The problem here is that the parent of the x is actually a <p> tag that is wrapped around the close button, caused by the wordpress wpautop crap.

    You could use .parent().parent() to do this, but I used your calendar on another site and that site didn’t have the extra p tag added.

    The best solution would be to change the parent().toggle(); to:


    So it will find the closest div with a class name of details as it travels up the dom and toggle that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Joe Dolson


    Thanks! That’s a good suggestion. The whole world of wpautop can be maddening…




    Hello, I am having the same issue

    I dont know where to place the html above

    I replaced the js from

    but I still have the same problem.

    Plugin Author Joe Dolson


    Please don’t make comments on resolved support threads; it’s only a freak chance that I looked at this — I generally don’t look at support threads if they’re marked “resolved”.

    If you can create a new support thread, provide a link to this one, and provide a link to your site, I may be able to help you.

    Alternately, you can submit a support request at My Calendar > Help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘My Calendar Event popup doesn't close (fix)’ is closed to new replies.