gpt4 book ai didi

javascript - mixItUp jQuery 插件不起作用

转载 作者:行者123 更新时间:2023-11-28 05:01:26 25 4
gpt4 key购买 nike

我已按照 mixitup 文档中的所有说明进行操作插件仍然无法正常工作。

插件中唯一有效的是当我刷新页面时,图像移动了,但是当我点击视频或咖啡或手机时什么都没发生!

//script
$('#Container').mixItUp();
.portfolio {
height: 400px;
}
.portfolio h2 {
margin: 0;
padding-top: 50px;
padding-bottom: 40px;
font-weight: normal;
}
.portfolio ul li {
display: inline-block;
color: #555;
border: 2px solid #DDD;
padding: 10px 20px 10px 20px;
}
.portfolio ul {
padding: 0;
margin: 0;
}
.portfolio ul li.active {
background-color: #1abc9c;
border: 2px solid #1abc9c;
color: white;
}
.gallery {
margin: 40px 0 0 0;
}
.gallery .row div {
width: 30.3333%;
float: left;
position: relative;
margin: 5px;
}
.gallery .row img {
width: 100%;
height: 100%;
}
.gallery .row .g-overlay {
position: absolute;
top: -6px;
left: -5px;
width: 100%;
height: 100%;
/*background-color: rgba(0,0,0,.7);*/
background-color: #1abc6c;
opacity: 0.9;
display: none;
}
.gallery .row .g-overlay h3 {
color: #FFF;
text-align: center;
line-height: 180px;
}
.gallery .row .g-overlay span.heart {
position: absolute;
bottom: 10px;
color: white;
right: 10px;
}
.gallery .row div:hover .g-overlay {
display: block;
}
/* Mixit up plugin*/

#Container .mix {
display: none;
}
<div class="portfolio">
<div class="container">
<h2>Projects</h2>
<ul>
<li class="active filter" data-filter="all">All</li>
<li class="filter" data-filter=".mobile">Mobile</li>
<li class="filter" data-filter=".coffee">Coffee</li>
<li class="filter" data-filter=".video">video</li>
</ul>
<div id="Container" class="gallery">
<div class="row">
<div class="mix mobile">
<img src="images/gallery/1.jpg">
<div class="g-overlay">
<h3>Read More</h3>
<span class="heart"><i class="fa fa-heart" aria-hidden="true"></i> 14</span>
</div>
</div>
<div class="mix coffee">
<img src="images/gallery/2.jpg">
<div class="g-overlay">
<h3>Read More</h3>
<span class="heart"><i class="fa fa-heart" aria-hidden="true"></i> 14</span>
</div>
</div>
<div class="mix video">
<img src="images/gallery/3.jpg">
<div class="g-overlay">
<h3>Read More</h3>
<span class="heart"><i class="fa fa-heart" aria-hidden="true"></i> 14</span>
</div>
</div>
</div>
<div class="row">
<div class="mix video">
<img src="images/gallery/4.jpg">
<div class="g-overlay">
<h3>Read More</h3>
<span class="heart"><i class="fa fa-heart" aria-hidden="true"></i> 14</span>
</div>
</div>
<div class="mix mobile">
<img src="images/gallery/5.jpg">
<div class="g-overlay">
<h3>Read More</h3>
<span class="heart"><i class="fa fa-heart" aria-hidden="true"></i> 14</span>
</div>
</div>
<div class="mix coffee">
<img src="images/gallery/6.jpg">
<div class="g-overlay">
<h3>Read More</h3>
<span class="heart"><i class="fa fa-heart" aria-hidden="true"></i> 14</span>
</div>
</div>
</div>
</div>
</div>
</div>

enter image description here

最佳答案

如何将 JS 放入 dom 准备好的函数中?

$(function(){
$('#Container').mixItUp();
});

关于javascript - mixItUp jQuery 插件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40088575/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com