Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

jquery function is not called but parent function is, not sure why

I’m building something with fullcallendar and I’m testing out my eventclick

when I press the item on screen I see "eventClick called" in console BUT not "getScript called" . what am I missing?

            eventClick: function(event, jsEvent, view) {//EDIT
                console.log("eventClick called")
                $.getScript(event.edit_url, function() {
                    console.log("getScript called");
                });
            },

Thank you for your time

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

From the documentation:

The second argument to getScript is:

A callback function that is executed if the request succeeds.

If it doesn’t get called, then the request didn’t succeed.

Either the click which triggered it had a side effect (such as navigating to a new page) that cancelled the request or something else went wrong (such as a network error or the URL not returning a script).

These last two options can both be debugged in the Network tab of the developer tools (which will show you the HTTP response status, content-type, and the response body.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading