Gntvls
Gntvls

Reputation: 230

jQuery function does not start on loading page

I have this script in my page header:

<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
    $(document).idleTimeout({
        inactivity: 30000,
        noconfirm: 10000,
        sessionAlive: 10000
    });
});

But it generates error, and i can't understand why. Error is this:

Uncaught TypeError: Object [object Object] has no method 'idleTimeout'

I'm using jQuery : jquery-1.10.2.min.js

Thanks for help.

UPDATE Thanks for help, it was typo in script source path.

Upvotes: 1

Views: 1028

Answers (3)

user1441950
user1441950

Reputation:

I saw the project on github and the example page is using jQueryUI as well.

Have you put it in your header? Have you put it just after your jquery-1.10.2.min.js?

Upvotes: 1

Devang Rathod
Devang Rathod

Reputation: 6736

Simple include your idleTimeout plugin js

<html>
<head>
      <script src="includes/ui/flat/js/plugins/timeut/jquery-idleTimeout.js"></script>
</head>
<body></body>
</html>

Upvotes: 1

Anton
Anton

Reputation: 32581

idleTimeout is not a jQuery default function you need to download this plugin

idleTimeout

Upvotes: 5

Related Questions