[英]Cyclic code not working on Drupal-7
I used slide.js file inside .info, following are the codes: 我在.info中使用了slide.js文件,以下是代码:
var $j = jQuery.noConflict();
$( document ).ready(function( ) {
$j('#block-block-29').cycle({
slideResize: false,
containerResize: true,
fit: 0,
fx: 'fade' // transition type
});
});
I put two images inside #block-block-29 and used proper CSS, they are supposed to shuffle but not behaving as required. 我将两个图像放在#block-block-29内,并使用了正确的CSS,它们应该随机播放但不能按要求运行。 I did many permutation and combination but no success, also included above codes directly inside html.tpl.php but still no result.
我做了很多置换和组合,但没有成功,也直接在html.tpl.php中包含了上面的代码,但仍然没有结果。
Use $j for document ready also.
也可以使用$ j准备文档。 When you put jQuery into no-conflict mode, you have the option of assigning a new variable name to replace the $ alias.
当您将jQuery置于无冲突模式时,可以选择分配新的变量名来替换$别名。
var $j = jQuery.noConflict();
$j(document).ready(function( ) {
$j('#block-block-29').cycle({
slideResize: false,
containerResize: true,
fit: 0,
fx: 'fade' // transition type
});
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.