I download html Template. In master page I put HTML code. All query library was included. After build mvc project I don't see scroll images. But in usual html it's perfect work. I think it's because on master page I use tag: $(document).ready(function () {. So. The Html code on master page:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Home</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" media="screen" href="/Content/reset.css">
<link rel="stylesheet" type="text/css" media="screen" href="/Content/grid.css">
<link rel="stylesheet" type="text/css" media="screen" href="/Content/style.css">
<link rel="stylesheet" type="text/css" media="screen" href="/Content/slider.css">
<link href='http://fonts.googleapis.com/css?family=Passion+One:400' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,800' rel='stylesheet' type='text/css'>
<script src="/Scripts/jquery-1.7.min.js"></script>
<script src="/Scripts/jquery.easing.1.3.js"></script>
<script src="/Scripts/tms-0.4.1.js"></script>
<script>
$(document).ready(function () {
$('.slider')._TMS({
show: 0,
pauseOnHover: false,
prevBu: false,
nextBu: false,
playBu: false,
duration: 1000,
preset: 'fade',
pagination: true, //'.pagination',true,'<ul></ul>'
pagNums: false,
slideshow: 8000,
numStatus: false,
banners: 'fade', // fromLeft, fromRight, fromTop, fromBottom
waitBannerAnimation: false,
progressBar: false
});
})
</script>
</head>
The script tms-0.4.1.js starts with this code:
/* jQuery based image slider
/* TMSlider 0.4.1 */
;(function($){
$.fn.TMSlider=$.fn.TMS=$.fn._TMS=function(o){
return this.each(function(){
var th=$(this),
In browser I see error:
TypeError: $(...)._TMS is not a function
progressBar: false
In fact usual HTML perfect work with out error. Can you help me fix it?
You need to include jquery above this:
<script src="/Scripts/tms-0.4.1.js"></script>
Place:
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
Unless you already have and you didnt show us in your code.
REVISION:
I also don't see a closing semi colon at the end of your document.ready function.
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.