简体   繁体   中英

Electron jquery.easing is not a function

I'm trying to make an Electron-App out of my existing website. So I installed everything via npm and copied to files of my website to the electron folder.

The app start's and my first page works fine but on another page im using jquery to animate something. Here I get this error:

Uncaught TypeError: jQuery.easing[this.easing] is not a function
at init.run (C:\Users\bla\node_modules\jquery\dist\jquery.js:6710)
at tick (C:\Users\bla\node_modules\jquery\dist\jquery.js:7094)
at Function.jQuery.fx.tick (C:\Users\bla\node_modules\jquery\dist\jquery.js:7436)
at schedule (C:\Users\bla\node_modules\jquery\dist\jquery.js:6813)

I'm reffering to jquery like this:

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js'></script>
  <script> window.$ = window.jQuery = require('jquery'); </script>
  <script> window.$ = window.jQuery = require('jquery-ui'); </script>

It works now, the line

<script> window.$ = window.jQuery = require('jquery-ui'); </script>

isn't needed and also the order has to be changed to:

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script> window.$ = window.jQuery = require('jquery'); </script>
  <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js'></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
    crossorigin="anonymous"></script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM