Title: javascript API for My Calendar?
Last modified: August 22, 2016

---

# javascript API for My Calendar?

 *  Resolved [Dr_jAcKaSS](https://wordpress.org/support/users/dr_jackass/)
 * (@dr_jackass)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-api-for-my-calendar/)
 * Dear Joe,
 * I am wondering whether there are any API call for My Calendar?
 * I would like catch the event when mini calendar is loaded.
    I wish to have category
   list hidden and to appear on click. But if I attach a click event to “Categories”
   title, it disappears when the calendar reloads via ajax (e.g. user clicks on “
   next month”).
 * Is there any way I could achieve this?
 * Best
 * [https://wordpress.org/plugins/my-calendar/](https://wordpress.org/plugins/my-calendar/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Joe Dolson](https://wordpress.org/support/users/joedolson/)
 * (@joedolson)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-api-for-my-calendar/#post-5306745)
 * If you’re using AJAX navigation, you need to make sure to use a live event attachment
   if you’re going to attach to events. In jQuery, you’ll need to use the ‘on’ function:
 *     ```
       $( '.your-target' ).on( 'click', function(e) {
           e.preventDefault();
           // do something
       });
       ```
   
 *  Thread Starter [Dr_jAcKaSS](https://wordpress.org/support/users/dr_jackass/)
 * (@dr_jackass)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-api-for-my-calendar/#post-5306788)
 * Thanks, Joe, for pointing me in the right direction!
 * Here is the solution:
 *     ```
       $('#jd-calendar.mini').on("click", ".category-key", function() {
           //do something
       });
       ```
   
 * Here is the link to more detailed explanation: [http://stackoverflow.com/questions/8752321/jquery-live-vs-on-method-for-adding-a-click-event-after-loading-dynamic-ht](http://stackoverflow.com/questions/8752321/jquery-live-vs-on-method-for-adding-a-click-event-after-loading-dynamic-ht)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘javascript API for My Calendar?’ is closed to new replies.

 * ![](https://ps.w.org/my-calendar/assets/icon-256x256.png?rev=1097576)
 * [My Calendar - Accessible Event Manager](https://wordpress.org/plugins/my-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/my-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-calendar/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Dr_jAcKaSS](https://wordpress.org/support/users/dr_jackass/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/javascript-api-for-my-calendar/#post-5306788)
 * Status: resolved