Error: Uncaught TypeError: Cannot read properties of undefined (reading 'apply')

Lolalolita 0 Reputation points
2023-02-12T09:00:29.79+00:00

Hi everybody i have issue with my website perlebleu. I have the following error once i run an audit. Uncaught TypeError: Cannot read properties of undefined (reading 'apply') noticed in the following VM11 jquery.eislideshow.js:32.

Here is image showing error enter image description here

here is the code

`var $event = $.event, resizeTimeout;

$event.special.smartresize  = {
    setup: function() {
        $(this).bind( "resize", $event.special.smartresize.handler );
    },
    teardown: function() {
        $(this).unbind( "resize", $event.special.smartresize.handler );
    },
    handler: function( event, execAsap ) {
        // Save the context
        var context = this,
            args    = arguments;

        // set correct event type
        event.type = "smartresize";

        if ( resizeTimeout ) { clearTimeout( resizeTimeout ); }
        resizeTimeout = setTimeout(function() {
            jQuery.event.handle.apply( context, args );
        }, execAsap === "execAsap"? 0 : 100 );
    }
};`
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,001 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
343 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AgaveJoe 28,536 Reputation points
    2023-02-12T16:19:46.3333333+00:00

    An undefined error can have many sources and means an object is not defined. Maybe missing a jQuery reference, jQuery is referenced after the 3rd party slide show library, an issue with the way you're initializing the 3rd party library, or maybe a versioning issue.

    The support documentation for the slide show library is the best place to start.

    If you want community support than we need enough code to reproduce this issue along with the 3rd party library you are using. Otherwise, we can only guess what what's wrong.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.