jquery 和 t3jquery 有什么区别
what's the difference beetwen jquery and t3jquery
jquery 和 t3jquery(jQuery 直接来自 Typo3)有什么区别,为什么 bootstrap 只适用于第一个。
t3jquery 是一个扩展(不是来自核心!),可以选择构建您的个人 jQuery 包(jQuery-版本和 jQuery-可能包含模块),因此您的 javascript 库 jQuery 仅能满足您的需求。您还可以通过从 CDN 中单击几下来包含 jQuery,这对于无法手动包含 CDN 源或将 jquery 版本复制到他们的服务器的开发人员来说更容易。
除本地以外的任何现成构建源都可能包含所有可能的 jQuery 模块。
单个 jQuery 库可能会更快(加载的代码更少),但所有模块的大包含可能会更快,因为这个版本可能已经从其他方面加载了 - IF 您正在使用 CDN 进行包含。
如果您使用来自您的 TYPO3 来源的 jQuery(另一种选择),您将确定它可用(没有访问其他域)并且它将是一个实际版本(只要您更新您的TYPO3 核心),但您的访问者需要从 BE 访问文件,出于安全原因可能会限制这些文件以保护 BE。
如果你想包含 jQuery 上面的选项可以这样实现:
基本包含与任何其他 javascript 文件一样
多个选项:
您存储在文件系统某处的 jquery 副本:
page.includeJSLibs {
jquery = fileadmin/JS/jquery.min.js
}
一份 jquery 您存储在站点扩展中某处的副本:
page.includeJSLibs {
jquery = EXT:site_abc/Resources/Public/JavaScript/jquery.min.js
}
像CDN一样包含外部
page.includeJSLibs {
jquery = //ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
jquery.external = 1
}
jquery来自TYPO3核心
page.javascriptLibs {
jQuery = 1
jQuery.source = local
}
jquery 来自 CDN
page.javascriptLibs {
# include jQuery (boolean)
jQuery = 1
# Change the version
# (possible values: latest|1.7.2|…, default: latest)
# Note: jQuery.source has to be a CDN like "google"
# when jQuery.version is not "latest"
jQuery.version = latest
# Include from local or different CDNs
# (possible values: local|google|jquery|msn, default: local)
jQuery.source = jquery
# Set jQuery into its own scope to avoid conflicts (boolean)
jQuery.noConflict = 1
# Change the namespace when noConflict is activated
# and use jQuery with "TYPO3.###NAMESPACE###(…);"
# (string, default: jQuery)
jQuery.noConflict.namespace = ownNamespace
}
扩展 t3jquery 可以为您包含 JS 库,但您最好使用它来将个性化 jQuery 库复制到您可以自己包含它的文件系统中。
jquery 和 t3jquery(jQuery 直接来自 Typo3)有什么区别,为什么 bootstrap 只适用于第一个。
t3jquery 是一个扩展(不是来自核心!),可以选择构建您的个人 jQuery 包(jQuery-版本和 jQuery-可能包含模块),因此您的 javascript 库 jQuery 仅能满足您的需求。您还可以通过从 CDN 中单击几下来包含 jQuery,这对于无法手动包含 CDN 源或将 jquery 版本复制到他们的服务器的开发人员来说更容易。
除本地以外的任何现成构建源都可能包含所有可能的 jQuery 模块。
单个 jQuery 库可能会更快(加载的代码更少),但所有模块的大包含可能会更快,因为这个版本可能已经从其他方面加载了 - IF 您正在使用 CDN 进行包含。
如果您使用来自您的 TYPO3 来源的 jQuery(另一种选择),您将确定它可用(没有访问其他域)并且它将是一个实际版本(只要您更新您的TYPO3 核心),但您的访问者需要从 BE 访问文件,出于安全原因可能会限制这些文件以保护 BE。
如果你想包含 jQuery 上面的选项可以这样实现:
基本包含与任何其他 javascript 文件一样
多个选项:
您存储在文件系统某处的 jquery 副本:
page.includeJSLibs {
jquery = fileadmin/JS/jquery.min.js
}
一份 jquery 您存储在站点扩展中某处的副本:
page.includeJSLibs {
jquery = EXT:site_abc/Resources/Public/JavaScript/jquery.min.js
}
像CDN一样包含外部
page.includeJSLibs {
jquery = //ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js
jquery.external = 1
}
jquery来自TYPO3核心
page.javascriptLibs {
jQuery = 1
jQuery.source = local
}
jquery 来自 CDN
page.javascriptLibs {
# include jQuery (boolean)
jQuery = 1
# Change the version
# (possible values: latest|1.7.2|…, default: latest)
# Note: jQuery.source has to be a CDN like "google"
# when jQuery.version is not "latest"
jQuery.version = latest
# Include from local or different CDNs
# (possible values: local|google|jquery|msn, default: local)
jQuery.source = jquery
# Set jQuery into its own scope to avoid conflicts (boolean)
jQuery.noConflict = 1
# Change the namespace when noConflict is activated
# and use jQuery with "TYPO3.###NAMESPACE###(…);"
# (string, default: jQuery)
jQuery.noConflict.namespace = ownNamespace
}
扩展 t3jquery 可以为您包含 JS 库,但您最好使用它来将个性化 jQuery 库复制到您可以自己包含它的文件系统中。