如何解决Slick carousel jquery冲突问题? 我尝试了唯一的基础,它是有效的。但是当我与我的MVC框架集成时,它就不起作用了。基本上,我在前端使用的javascript插件不止一个。所以我认为这是由于jquery冲突造成的
我在如何解决Slick carousel jquery冲突问题? 我尝试了唯一的基础,它是有效的。但是当我与我的MVC框架集成时,它就不起作用了。基本上,我在前端使用的javascript插件不止一个。所以我认为这是由于jquery冲突造成的,javascript,jquery,carousel,Javascript,Jquery,Carousel,我在标记前放置的脚本 </script> <!--<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>-->(I have to comment this otherwise the another banner plugin doesnt work) <script src="//code.jquery.com/jquery-migrate-1.
标记前放置的脚本
</script>
<!--<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>-->(I have to comment this otherwise the another banner plugin doesnt work)
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js"></script>
<script type="text/javascript" src="<?php echo $data['config']['THEME_DIR']; ?>/js/slick.js"></script>
<script type="text/javascript" src="<?php echo $data['config']['THEME_DIR']; ?>/js/script.js"></script>
(我必须对此发表评论,否则另一个横幅插件不起作用)
var jq=jQuery.noConflict()代码>是您所需要的。
您需要在受影响的插件中替换$或jQuery。请确保在这两种情况下都不要使用相同的变量名 var js=jQuery.noConflict()代码>到jquery冲突issue@Glizzweb,但你能告诉我把它放在我的箱子里的什么地方吗?
<link href="<?php echo $data['config']['THEME_DIR']; ?>/css/foundation/slick.css" rel="stylesheet" type="text/css" />
<section id="features" class="blue">
<div class="content">
<h2>Autoplay</h2>
<div class="slider autoplay">
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
<div><h3>5</h3></div>
<div><h3>6</h3></div>
</div>
</div>
</section
<script src="**http:**//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="**http:**//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="**http:**//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js"></script>
<script type="text/javascript" src="<?php echo $data['config']['THEME_DIR']; ?>/js/slick.js"></script>
<script type="text/javascript" src="<?php echo $data['config']['THEME_DIR']; ?>/js/script.js"></script>
<script src="**http:**//code.jquery.com/jquery-1.11.0.min.js"></script>