I am using the BigText library to expand text inside my divs.
I have copied the file on my webserver and included it as following:
<script type="text/javascript" src="../js/vendor/jquery-1.9.1.min.js"></script>
<script src="../js/imgLiquid-min.js"></script>
<script type="text/javascript" src="../js/fullpage/vendors/jquery.slimscroll.min.js"></script>
<script type="text/javascript" src="../js/fullpage/jquery.fullPage.js"></script>
<script type="text/javascript" src="../js/fullpage/examples.js"></script>
<script type="text/javascript" src="../js/jquery-bigtext.js"></script>
<script src="../js/modernizr.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#fullpage').fullpage({
var bt = BigText.noConflict(true);
$.fn.bt = bt.jQueryMethod;
$('.referencesProductHeader').bigtext();
});
</script>
When running the code I get the issue:
Uncaught Syntax Error: Unexpected token ILLEGAL (jquery-bigtext.js)
Why should there be a syntax error? I just have copied the file.
And the issue:
Uncaught ReferenceError: BigText is not defined.
What am I doing wrong? I have followed the steps of the samples...
Related
I use the below script in jQuery pagination:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script src="~/Scripts/paging.js"></script>
but the below error appeared:
Uncaught TypeError: $(...).paging is not a function
I don't know what the problem can be. Although paging.js is loaded it seems that the code does not see the file.
Use this code, it worked for me.
I think you may not have gotten the jQuery syntax right
<script type="text/javascript">
$(document).ready(function(){
$('#table-demo').paging({limit:7});
});
</script>
I am simply trying to show 3 diagrams, nothing more. The problem I am encountering is that the whole page turns white when I include the javascript files that belongs to the diagram number 2 and 3. How can I prevent this conflict, any ideas?
Error code I receive in console:
uncaught exception: Highcharts error #16:
www.highcharts.com/errors/16
SyntaxError: expected expression, got '<'
ExhaustTemperature.js $(...).highcharts is not a function
Here is the library for diagram 1.
<script src="highcharts.js"></script>
<script src="highcharts-more.js"></script>
Here is the library for diagram 2 and 3.
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
Then the funny part... The whole page turns white when I include these two javascript files.
<script src="diagram2.js"></script>
<script src="diagram3.js"></script>
This is what it looks like in index.html file.
<script src="highcharts.js"></script>
<script src="highcharts-more.js"></script>
<script src="http://code.highcharts.com/stock/highstock.js"></script>
<script src="http://code.highcharts.com/stock/modules/exporting.js"></script>
<script src="diagram2.js"></script>
<script src="diagram3.js"></script>
I am trying to use date picker of jquery in mvc4.
It was giving me error:
Uncaught TypeError: undefined is not a function
My jQuery function is like:
$(document).ready(function () {
$('#dpFrom').datepicker();
});
html part is like:
<input type="text" id="dpFrom" />
I refered :
Uncaught TypeError: undefined is not a function while using jQuery UI
And included :
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
So total javascript became:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css" />
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('#dpFrom').datepicker();
});
</script>
Still its giving me error.
Please help...
I think that you have a duplicate jQuery reference. Could you open a "View Source" on your web browser and enumerate your jQuery references? It is a common error and easily missed. Maybe a bundle definition or your layout and content pages have the same reference.
The path should be https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js not //ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js in both referencing script and css tags
<script type="text/javascript">
$( "#datepicker" ).datepicker();
</script>
I tried this one, when i erase the function().
The code I have below works if it's on my server but when viewed on my local machine it gives me the following errors:
ReferenceError: jQuery is not defined
$(document).ready(function() {
default.html (line 24)
ReferenceError: $ is not defined
$(document).ready(function() {
default.html (line 12)
ReferenceError: $ is not defined
$(document).ready(function() {
CODE:
<script src="//code.jquery.com/jquery-latest.min.js"></script>
<link rel="stylesheet" href="slider/site/style.css">
<script type="text/javascript" src="slider/src/unslider.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var unslider = $('.container').unslider();
$('.arrow').click(function() {
var fn = this.className.split(' ')[1];
// Either do unslider.data('unslider').next() or .prev() depending on the className
unslider.data('unslider')[fn]();
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('.line1').fadeIn(7000);
$('#slide2').delay(1000).fadeIn(3200);
$('#slide3').delay(1800).fadeIn(3200);
$('.line4').delay(4000).fadeIn(3500);
});
</script>
Your script tag is probably giving your browser trouble. Replace "//code.jquery.com/jquery-latest.min.js" with "http://code.jquery.com/jquery-latest.min.js" and it should then work.
Replace
<script src="//code.jquery.com/jquery-latest.min.js"></script>
with
<script src="code.jquery.com/jquery-latest.min.js"></script>
Your code couldn't find jquery.
Add http to
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
this will do the trick
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
//code.jquery.com/jquery-latest.min.js this is pointing to find jQuery in the local server but the script is not available in the local server so chnage this to http://code.jquery.com/jquery-latest.min.js"
You could have also downloaded the latest version and placed it in a js folder under your docroot. Then you could have accessed it with:
<script src="js/jquery-latest.min.js"></script>
I have a designed a website and included some java scripts, they run perfectly locally but on uploading to the server, nothing works!! I tried changing the reference to the pages to //http: but still...nothing. I've tried testing on the server with a simple alert text box,it works. I don't understand why the other .js scripts aren't working. please Help.
<script type="text/javascript">
var shutterSettings = {"msgLoading":"L O A D I N G","msgClose":"Click to Close","imageCount":"1"};
</script>
<script src='http://www.broadigital.co.ke/style/newcss/js/shutter-reloaded.js?ver=1.3.3' type='text/javascript' ></script>
<script src='http://www.broadigital.co.ke/style/newcss/js/jquery.js?ver=1.7.2' type='text/javascript' ></script>
<script src='http://www.broadigital.co.ke/style/newcss/js/jquery.cycle.all.min.js?ver=2.9995' type='text/javascript' ></script>
<script src='http://www.broadigital.co.ke/style/newcss/js/ngg.slideshow.min.js?ver=1.06' type='text/javascript' ></script>
<script src='http://www.broadigital.co.ke/style/newcss/js/jquery.flexslider-min.js?ver=3.4.2' type='text/javascript' ></script>
Uncaught SyntaxError: Unexpected end of input jquery.js:6
Uncaught ReferenceError: jQuery is not defined
Check if you uploaded jQuery correctly. The file might have been truncated in the process.
UPDATE
Checking your jQuery file, the file truncates on line 6 with these as the last few characters.
if(this[0]){var b=f(a,this[0].owne
SOLUTION
Re-upload the jQuery file (jquery.js) again, or
Use jQuery CDN:
Change:
<script src='http://www.broadigital.co.ke/style/newcss/js/jquery.js?ver=1.7.2' type='text/javascript'></script>
To:
<script src='http://code.jquery.com/jquery-1.7.2.min.js' type='text/javascript'></script>