Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close the day element when clicking anywhere #236

Open
thaqiftaher opened this issue Nov 12, 2018 · 0 comments
Open

Close the day element when clicking anywhere #236

thaqiftaher opened this issue Nov 12, 2018 · 0 comments

Comments

@thaqiftaher
Copy link

Hi,

I have modified the code so that the event info will be shown just after we clicked the specific day. I changed the mouseOnDay to clickDay and set the popover to show. This is the code:

clickDay: function(e) {
            if(e.events.length > 0) {
                var content = '';
                
                for(var i in e.events) {
                    content += '<div class="event-tooltip-content">'
                                    + '<div class="event-name" style="color:' + e.events[i].color + '; white-space:nowrap;">' + e.events[i].name + '</div>'
                                    + '<div class="event-location">' + e.events[i].location + '</div>'
                                + '</div>';
                }
            
                $(e.element).popover({ 
                    trigger: 'manual',
                    container: 'body',
                    html:true,
                    content: content,
                    placement: 'auto'
                });
                
                $(e.element).popover('show');
            }

            
        }

I would love to close the info when we click anywhere. mouseOutDay is not quite the right fit for this case. Is there anyway to achieve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant