欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

TypeError: $(...).on is not a function drupal的jquery版本有时低出问题

shiping1 的头像
你可能要添加您的安装的更多细节进入正题。举例来说,我假设你正在使用的引导主题?并没有安装/配置jQuery的更新使用jQuery 1.7?
You'll probably want to add more details of your installation into the question. For example, I assume you're using the Bootstrap theme? And haven't installed/configured jQuery Update to use jQuery 1.7?

应该是由于jquery版本太低的原因
1)安装 jquery update模块 (安装 6.x-2.x-dev 或  6.x-2.0-alpha1 版本吧)
2)安装 jquery ui模块
3)到 http://code.google.com/p/jquery-ui/downloads/list?q=1.7 (这是1.7的路径 不一定是1.7的版本 但是我做的时候是1.7的版本)
下载 相应 jquery文件 放到 sites\all\libraries\jquery.ui 目录下 (又好像不需要)
路径像  so the actual jQuery UI JavaScript files are located in:
    /sites/all/libraries/jquery.ui/ui/*.js
 这样

4) 到 admin/settings/jquery_update 里面配置下jquery版本
用上1.7就会与view 使用有冲突 哎
冲突报的错
大概就是这样的错

An error occurred at /admin/build/views/ajax/display/home/default/analyze-theme




jquery.ui的路径如下


-- SUMMARY --

jQuery UI (http://ui.jquery.com/) is a set of cool widgets and effects that
developers can use to add some pizazz to their modules.

This module is more-or-less a utility module that should simply be required by
other modules that depend on jQuery UI being available. It doesn't do anything
on its own.

For a full description of the module, visit the project page:
  http://drupal.org/project/jquery_ui

To submit bug reports and feature suggestions, or to track changes:
  http://drupal.org/project/issues/jquery_ui


-- REQUIREMENTS --

* The jQuery UI library.


-- INSTALLATION --

* Copy the jquery_ui module directory to your sites/all/modules directory, so it
  is located in sites/all/modules/jquery_ui/.

* Download the jQuery UI 1.6 release from:

    http://code.google.com/p/jquery-ui/downloads/list?q=1.6

* Put the downloaded archive into the directory:

    /sites/all/libraries/jquery.ui-1.6.zip

* Extract the archive.  This will create the following sub-directory:

    /sites/all/libraries/jquery.ui-1.6/

* Rename the sub-directory into "jquery.ui":

    /sites/all/libraries/jquery.ui/

  so the actual jQuery UI JavaScript files are located in:

    /sites/all/libraries/jquery.ui/ui/*.js

* Enable the module at Administer >> Site building >> Modules.


-- JQUERY UI 1.7 --

The jQuery UI module uses jQuery UI 1.6 because jQuery UI 1.7 requires at least
jQuery 1.3, which is not shipped with Drupal 6. If you absolutely need to move
to jQuery UI 1.7, you can get around this by doing the following:

* Download and install the corresponding jQuery Update module from:

    http://drupal.org/project/jquery_update

* Download the latest jQuery UI 1.7 release from:

    http://code.google.com/p/jquery-ui/downloads/list?q=1.7

* Put the downloaded archive into the directory:

    /sites/all/libraries/jquery.ui-1.7.zip

* Extract the archive.  This will create the following sub-directory:

    /sites/all/libraries/jquery.ui-1.7/

* Rename the sub-directory into "jquery.ui":

    /sites/all/libraries/jquery.ui/

  so the actual jQuery UI JavaScript files are located in:

    /sites/all/libraries/jquery.ui/ui/*.js

* Enable the module at Administer >> Site building >> Modules.


-- API --
普通分类: