Uncaught TypeError:Object [object object] has no method'on' [英] Uncaught TypeError:Object[object object] has no method 'on'

查看:254
本文介绍了Uncaught TypeError:Object [object object] has no method'on'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我会试试这个:



这里,更改下面标记的位置

 < head> 
< link href =css / scrollable-horizo​​ntal.css =stylesheettype =text / css/>
< link href =css / scrollable-buttons.css =stylesheettype =text / css/>
< script src =js / jquery-1.6.1.min.js>< / script> <! - 更改此行 - >
< script src =js / jquery.tools.min.js>< / script>
< / head>


I m going to try this: http://jquerytools.org/demos/scrollable/index.html
But without any event trigger, I m getting below error

But I have confusion about, why the on method not finding in even page load

<head>
<link href="css/scrollable-horizontal.css" rel="stylesheet" type="text/css" />
<link href="css/scrollable-buttons.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.6.1.min.js"></script>
<script src="js/jquery.tools.min.js"></script>
</head>  

Nothing done at javascript part

<script>
$(function() {
  // initialize scrollable
  $(".scrollable").scrollable();
});
</script>  

It stopped my further implementation. Have any idea about this?

解决方案

JQuery .on method was added in 1.7. You need to update your JQuery as from your screenshot you are currently using 1.6

http://api.jquery.com/on/

Once downloaded from here, change the below where marked

<head>
<link href="css/scrollable-horizontal.css" rel="stylesheet" type="text/css" />
<link href="css/scrollable-buttons.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.6.1.min.js"></script> <!-- Change this line -->
<script src="js/jquery.tools.min.js"></script>
</head>  

这篇关于Uncaught TypeError:Object [object object] has no method'on'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆