Sophie Jones
Sophie Jones

Reputation: 1

Adding Pop-Up to Event in Fullcalendar API

I'm using the version 3.4.0 of fullcalendar and am trying to create a pop-up when I click on an event on the calendar. I've tried lots of different methods, but don't really understand the coding well enough in a lot of the tutorials I've found and nothing seems to work. I've tried using this:

    eventClick: function(event) {
// opens events in a popup window
$('#popup').html('<iframe src="'+event.url+'" width="700" height="600"></iframe>');
$('#popup').dialog({autoOpen: false, modal: true, width: 750, height: 675});
return false;
   },

with a pop-up div identified in the body of the page, but I'm not sure what I have to add to this to make it work properly? All I want the pop-up to say is 'Under Construction'.

Thanks for any help, I'm really new to coding.

Upvotes: 0

Views: 436

Answers (1)

Hamuel
Hamuel

Reputation: 633

Basically you copy the css, html, js basically you change the text in the modal-content class check the documentation below for more examples.

<!-- The Modal -->
<div id="myModal" class="modal">

  <!-- Modal content -->
  <div class="modal-content">
    <span class="close">&times;</span>
    <p>Under Construction</p>
  </div>

</div>

https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal

https://www.w3schools.com/howto/howto_css_modals.asp

Upvotes: 1

Related Questions