define is not defined jquery - ext-language_tools.js - javascript

I have this html page with these libraries:
...
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/ace.min.js" type="text/javascript" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.0/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
...
When I load my page in the console I have the following error:
Uncaught ReferenceError: define is not defined (jquery 1.12.4)
This problem si the library ext-language_tools.js that contains:
define("ace/snippets",["re....
What I can do to resolve the problem?

Related

Uncaught ReferenceError: $ is not defined Bootsrap Notify

I've just include the notify Plugin for bootstrap into my page. When I call
echo '<script>$( document ).ready(function() {$.notify("Hello World");});</script>';
the console told me this:
Uncaught ReferenceError: $ is not defined
Here are my Javascript includes.
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/bootstrap-notify.min.js"></script>
<script src="assets/js/select2.min.js"></script>
<script src="assets/js/contact.js"></script>
<script src="assets/js/smoothscroll.js"></script>
<script src="assets/js/counter.js"></script>
<script src="assets/js/page.js"></script>
<script src="assets/js/responsive-menu.js"></script>
Keep your jquery and boostrap js links in the top portion of your head tag and test it again .The problem must be resolved.
This is generally occurs because your doc ready function is loading prior than jquery.js.
<html>
<header>
jquery.js and bootstrap.js at top here
</header>
<body>
</body>
all the remaining links
<script>
document ready here
</script>
<html>

angular js injector modulr error

I'm trying to run this AngularJS example of a tutorial and the console says: Uncaught Error: [$injector:modulerr] when using restangular
Where is the problem?
<html >
<head>
<script src="../bower_components/angular/angular.min.js" type="text/javascript"></script>
<script src="../bower_components/underscore/underscore.js" type="text/javascrixpt"></script>
<script src="../bower_components/restangular/dist/restangular.js" type="text/javascrixpt"></script>
<script src="../bower_components/angular-route/angular-route.js" type="text/javascript"></script>
<script type="text/javascript" src="ang.js"></script>
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<script>
var app=angular.module('angular',['ngRoute','restangular']);
</script>
You need to check path to restangular.js. Also include jquery.js before angular.js.

Resolve Conflict When Using Highchart and Highmap together (TypeError: ma is not a function)

I've a page that contain chart and map menu for report function.
Then, I choose Highchart-Highmap library to reach the purpose above.
The chart function runs well but when I develop map function there's a error appear
TypeError: ma is not a function
I've traced the problem that the ma function is appear in highchart.js and highmaps.js but I don't know how to resolve this conflict.
I've try put jQuery.noConflict(); in highmaps but the conflict still appear
This how I code in main page
... some html code
<script type="text/javascript" src="././js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="././js/highcharts/highcharts-more.js"></script>
<script type="text/javascript" src="././js/highcharts/highcharts-3d.js"></script>
<script type="text/javascript" src="././js/highcharts/modules/drilldown.js"></script>
<script type="text/javascript" src="././js/highcharts/modules/exporting.js"></script>
... some html code
<script type="text/javascript" src="././js/Highmaps/highmaps.js"></script>
<script type="text/javascript" src="././js/Highmaps/modules/data.js"></script>
<script type="text/javascript" src="././js/Highmaps/modules/exporting.js"></script>
How I can resolve this problem?
Instead of highmaps, you need to use map.js module.
<script src="//code.highcharts.com/maps/modules/map.js"></script>
Here is the documentation on using both together.
You must include this script tag after highcharts.js:
<script src="https://code.highcharts.com/maps/modules/map.js"></script>
I encountered the same issue, and resolved it by placing highcharts after the maps
<script src="http://code.highcharts.com/maps/highmaps.js"></script>
<script src="http://code.highcharts.com/maps/modules/data.js"></script>
<script src="http://code.highcharts.com/maps/modules/exporting.js"></script>
<script src="http://code.highcharts.com/mapdata/custom/world.js"></script>
<script type="text/javascript" src="http://code.highcharts.com/highcharts.js"></script>
http://jsfiddle.net/danny_shumer/tc898kgv/2/

jQuery Mobile + Cordova random errors on startup, stuck on a grey circle in the middle

I have a jQuery Mobila app wrapped with Cordova that I test on my Android device. It is fine when I launch it normally, but when I use a web intent (https://github.com/Initsogar/cordova-webintent) to launch it, the console debug shows random errors coming from the jQuery Mobile js file:
D/CordovaLog(24140): file:///android_asset/www/jquery/jquery.mobile-1.4.0.min.js: Line 7661 : Uncaught TypeError: Object # has no method 'addClass'
D/CordovaLog(22727): file:///android_asset/www/jquery/jquery.mobile-1.4.0.min.js: Line 10116 : Uncaught TypeError: Object # has no method 'each'
I am aware that these bugs are properly caused by the code I am trying to render on startup, and I'm guessing that the js files I include in the tags in index.html might be in the wrong order. Here is my current setup:
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script src="jquery/jquery-1.9.1.min.js"></script>
<script src="jquery/jquery-ui.min.js"></script>
<script src="jquery/jquery.ui.touch-punch.min.js"></script>
<script src="jquery/jquery.mjs.nestedSortable.js"></script>
<script src="js/json2.js"></script>
<script src="js/jstorage.js"></script>
<script src="jquery/jquery.mobile-1.4.0.min.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript">
app.initialize();
</script>
I have also tried putting jquery.mobile-1.4.0.min.js under jquery-1.9.1.min.js, but similar things have happened.
Afterwards, I re-ordered them into this:
<script src="jquery/jquery-1.9.1.min.js"></script>
<script src="jquery/jquery.mobile-1.4.0.min.js"></script>
<script src="jquery/jquery-ui.min.js"></script>
<script src="jquery/jquery.ui.touch-punch.min.js"></script>
<script src="jquery/jquery.mjs.nestedSortable.js"></script>
<script src="js/json2.js"></script>
<script src="js/jstorage.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
<script type="text/javascript" src="js/app.js"></script>
And it seemed to work fine for a while or so, but am still seeing jQuery Mobile bugs here and there.

jqplots scripts are not getting read in html files

I have below scripts included in my html file
<!doctype html>
<html>
<head>
<script type="text/javascript" src="dist/jquery.min.js"></script>
<script type="text/javascript" src="dist/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="dist/plugins/jqplot.barRenderer.min.js"></script>
<script type="text/javascript" src="dist/plugins/jqplot.pieRenderer.min.js"></script>
<script type="text/javascript" src="dist/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="dist/plugins/jqplot.pointLabels.min.js"></script>
<link rel="stylesheet" type="text/css" href="dist/jquery.jqplot.min.css" />
</head>
<body>
.
.
</body>
</html>
but config,BarRenderer etc. functions are not getting identified & I am getting error in console:
Uncaught TypeError: Cannot read property 'config' of undefined
I identified this is due to html file not able to read those script. because if I comment all above script & run the code I get the same error.
My src path is correct. Can anyone please help me why this scripts are not being read & getting below error.
This might be too obvious but here it goes: the jquery.min.js script is usually identified by the version number.
Could it be that it is not finding the jquery script?

Categories