Backbone is not defined online but work on localhost - javascript

This code work on localhost but it's not working online
I get this Error online:
Uncaught ReferenceError: Backbone is not defined
Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="assets/js/libraries/jquery.base64.min.js"></script>
<script src="assets/js/libraries/jQueryRotateCompressed.js"></script>
<script src="assets/js/libraries/filereader.js"></script>
<script src="assets/js/libraries/modernizr.js"></script>
<script src="assets/js/libraries/html5slider.js"></script>
<script src="assets/js/libraries/underscore-min.js"></script>
<script src="assets/js/libraries/backbone-min.js"></script>
<script src="assets/js/libraries/backbone.nopersistence.js"></script>
<script src="assets/js/share.js"></script>
<script src="assets/js/mfanimated.js"></script>
<script src="assets/js/models.js"></script>
<script src="assets/js/ui.js"></script>
<script src="assets/js/startup.js"></script>
Error: Uncaught ReferenceError: Backbone is not defined

I Check the network tab and I see that they are not loaded correctly.
The probleme is solved.
Thanks.

Related

Uncaught TypeError: $(...).tempusDominus is not a function

<!-- Vendor JS Files -->
<script src="../assets/vendor/jquery/jquery-3.6.0.js"></script>
<script src="../assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="../assets/vendor/datatables/datatables.js"></script>
<script src="../assets/vendor/apexcharts/apexcharts.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.14.0-beta2/js/bootstrap-select.min.js" integrity="sha512-FHZVRMUW9FsXobt+ONiix6Z0tIkxvQfxtCSirkKc5Sb4TKHmqq1dZa8DphF0XqKb3ldLu/wgMa8mT6uXiLlRlw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="../assets/vendor/chart.js/chart.min.js"></script>
<script src="../assets/vendor/echarts/echarts.min.js"></script>
<script src="../assets/vendor/quill/quill.min.js"></script>
<script src="../assets/vendor/simple-datatables/simple-datatables.js"></script>
<script src="../assets/vendor/tinymce/tinymce.min.js"></script>
<script src="../assets/vendor/php-email-form/validate.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tempus-dominus/6.0.0-beta2/js/tempus-dominus.js"></script>
<script src="https://kit.fontawesome.com/a98bc9d553.js" crossorigin="anonymous"></script>
<!-- Template Main JS File -->
<script src="../assets/js/main.js"></script>
What's wrong with my script init? already tried, it always give me Uncaught TypeError: $(...).tempusDominus is not a function eventhough the Jquery already at the top
This page outlines using the picker with jQuery. The jQuery-provider.js file must be included after the main picker code. jQuery is no longer a requirement and is here for backwards compatibility.
Forgot to include the JSProvider.js

Meteor scaffolding for HTML templates

I've just bought an HTML template and I'm trying to work with it with Meteor.js in an iron scaffold. But I don't know where to place the js inide the template. This template is using this js files:
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/flickr.js"></script>
<script src="js/flexslider.min.js"></script>
<script src="js/lightbox.min.js"></script>
<script src="js/masonry.min.js"></script>
<script src="js/twitterfetcher.min.js"></script>
<script src="js/spectragram.min.js"></script>
<script src="js/ytplayer.min.js"></script>
<script src="js/countdown.min.js"></script>
<script src="js/smooth-scroll.min.js"></script>
<script src="js/scparallax.js"></script>
<script src="js/scripts.js"></script>
This is my scaffold.
enter image description here
Could anyone knows where do I need to put my js files?
Those are the errors I'm getting:
Uncaught SyntaxError: Unexpected token <
Uncaught TypeError: $(...).tooltip is not a function

Highcharts error loading maps plugin

Load jQuery
Load Highcharts 4.0.1
Load Highmaps 1.1.6 (which says it is compatible with 4.0.x)
seeing this error:
Uncaught TypeError: HighchartsAdapter.addAnimSetter is not a function
===
<html>
<head>
<script type='text/javascript' src='https://code.jquery.com/jquery-1.11.2.min.js'></script>
<script type='text/javascript' src='https://code.highcharts.com/4.0.1/highcharts.js'></script>
<script type='text/javascript' src='https://code.highcharts.com/maps/1.1.6/modules/map.js'></script>
</head>
</html>
fiddle: http://jsfiddle.net/93ukkqoh/ (see error in the javascript console)
Am I missing something obvious here?
Use following libraries in the following order
<script type='text/javascript' src='https://code.jquery.com/jquery-1.11.2.min.js'></script>
<script src="http://code.highcharts.com/highcharts.js"></script>
<script type='text/javascript' src='https://code.highcharts.com/maps/1.1.6/modules/map.js'></script>

Backbone is not defined in Backbone

I'm just starting backbone and am getting this error.
This is my index.html file:
<script type="text/template" id="login-template">
<div>Aditya</div>
</script>
<script src="./js/router/router.js"></script>
<script src="./js/jquery-latest.js"></script>
<script src="./js/jquery-ui-1.10.4.custom.js"></script>
<script src="./js/underscore-min.js"></script>
<script src="./js/backbone-min.js"></script>
<script src="./js/views/app.js"></script>
<script src="./js/views/login_view.js"></script>
</body>
Error: Uncaught ReferenceError: Backbone is not defined
Any help ?
Your router.js file may be using backbone object which is not included yet.
So move inclusion of router.js after backbone.js
<script src="./js/jquery-latest.js"></script>
<script src="./js/jquery-ui-1.10.4.custom.js"></script>
<script src="./js/underscore-min.js"></script>
<script src="./js/backbone-min.js"></script>
<script src="./js/router/router.js"></script>
<script src="./js/views/app.js"></script>
<script src="./js/views/login_view.js"></script>
<script src="./js/router/router.js"></script>
Is this an external js file that contains the backbone routes. If that's the case then it should be placed after the backbone-min.js.

Simple modal not working

I have problem with simple modal! Is not working I got some errors! I have mootols and jquery in header.php
Error is:
Uncaught TypeError: Object #<Object> has no method 'addEvent' demo.js:8
(anonymous function) demo.js:8
(anonymous function) mootools-core-1.3.1.js:354
h mootools-core-1.3.1.js:32
Array.implement.each mootools-core-1.3.1.js:38
invoke.fireEvent mootools-core-1.3.1.js:353
h
My code is:
<script type="text/javascript" src="js/mootools-core-1.3.1.js"></script>
<script type="text/javascript" src="js/mootools-more-1.3.1.1.js"></script>
<script type="text/javascript" src="js/simple-modal.js"></script>
<script type="text/javascript" src="js/demo.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
Move your last script tag to first
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="js/mootools-core-1.3.1.js"></script>
<script type="text/javascript" src="js/mootools-more-1.3.1.1.js"></script>
<script type="text/javascript" src="js/simple-modal.js"></script>
<script type="text/javascript" src="js/demo.js"></script>
It will work..
or may be you have multiple instances of jQuery on your page.
You need to either:
Aet rid of one of them (there's no need to have both)
Alias the jQuery used in custom.js
Use noConflict() to resolve which jQuery gets access to the $
variable.

Categories

Resources