java script movement is not reflected

Asked 2 years ago, Updated 2 years ago, 92 views

I don't like html, especially those who don't know how to call java script

In index.html,

<!DOCTYPE HTML>
<html>
<head>
    <metacharset="utf-8">
    <meta http-equiv="Content-Security-Policy" content="default-src*;style-src*'unsafe-inline';script-src*'unsafe-inline' 'unsafe-eval'>
    <script src="http://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript">/script>
    <script src="components/jquery.scrollablelink.js" type="text/javascript"></script>
    <script src="components/loader.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js">/script>
    <script type="text/javascript" src="popup.js"></script>
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="components/loader.css">
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.css"/>
        <script>
        ons.bootstrap();
    </script>
</head>
<body>
    <ons-sliding-menu var="app.slidingMenu" menu-page="menu.html" main-page="page1.html" side="left" type="overlay"max-slide-distance="200px">
    </ons-sliding-menu>
</body>
</html>

It says, but

DebugLogWarningError iPad/8.4 Onsen UI require jqLite.Load jQuery
after loading AngularJS to fix this error.jQuery may break Onsen UI
behavior.

It is said and executed, but another page (html other than index.html) does not reflect any java script movement.

Is the order of writing the code wrong? Thank you!

javascript monaca onsen-ui

2022-09-30 21:13

1 Answers

AngularJS is probably loaded in components/loader.js, but I think it is because jquery-1.11.0.min.js is loaded before this.For proper operation, jQuery appears to be loaded after AngularJS and OnsenUI (Reference.

However, Monaca seems to be able to incorporate jQuery for Monaca from the cloud IDE, so it would be better to remove the script tag that reads jquery-**.js and use it.

http://docs.monaca.mobi/3.5/ja/manual/dependencies/components/

Other things that bothered me...

  • Both jquery-1.11.0.min.js and jquery-1.8.1.min.js are loaded, but you cannot use different versions of the same library at the same time by default.It can simply be meaningless or malfunctioning.
  • jquery.mobile-1.1.min.css is loaded, but the jQuery Mobile JS file is not loaded (although if you only use the CSS part),


2022-09-30 21:13

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.