我正在使用Bootstrap Select为手风琴中的某些选择字段设置样式.Bootstrap select具有一个功能,如果它靠近屏幕底部,它将使你的下拉式下拉.
在这种情况下,我不希望它放弃,但我找不到禁用它的位置.
Bootstrap选择:https://developer.snapappointments.com/bootstrap-select/
我有一个页面左侧有一个粘性图像侧边栏,右侧有不同高度的标签内容.我遇到的问题是,当选择了较短的标签时,粘性侧边栏会溢出它的容器.
单击选项卡2并向下滚动页面可以观察到此行为.左侧的图像不应溢出到页脚.选项卡1显示正确的行为.
这是一个代码示例:http://codepen.io/anon/pen/gayMjx
<section class="js-pin-container">
<div class="row">
<div class="left-col">
<div class="js-pin-content">
<img src="http://placehold.it/250x250">
</div>
</div>
<div class="right-col">
<div id="tabs">
<ul>
<li><a href="#tabs-1">tab 1</a></li>
<li><a href="#tabs-2">tab 2</a></li>
<li><a href="#tabs-3">tab 3</a></li>
</ul>
<div id="tabs-1">
<p style="background: silver; height: 900px;">This dive is 900px tall.</p>
</div>
<div id="tabs-2">
<p style="background: silver; height: 600px;">This dive is 600px tall.</p>
</div>
<div id="tabs-3">
<p style="background: silver; height: 1200px;">This dive is 1200px tall.</p>
</div>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我想在一个以上但不是网站的所有页面上隐藏div.以下解决方案将其隐藏在一个页面上,但如何添加两个或三个特定页面?
原始答案:隐藏基于网址的div
<script language="text/javascript">
$(function(){
if (window.location.pathname == "mywebsite/Videos.html") {
$('#navleft').hide();
} else {
$('#navleft').show();
}
});
</script>
Run Code Online (Sandbox Code Playgroud) 我遇到了一个问题,我的网站上运行了一个响应滑块,该滑块已添加到外部.js文件中.我遇到一个问题,主页上没有弹出模态,因为页面正在寻找仅包含在几个子页面上的滑块.
Chrome控制台显示以下错误:
Uncaught TypeError: undefined is not a function
这是我目前的代码:
$('.my-carousel').slick({
speed: 330,
slidesToShow: 4,
});
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 nth-of-type 函数对一系列中的特定图像进行样式设置,但当我将图像包装在 a 标签中时,它似乎会中断。如果我只使用图像,效果很好。
这是我的小提琴: http://jsfiddle.net/o87oyfrx/1/
.row2 img:nth-child(2) {
border: 1px solid green;
}
<div class="row2">
<a href="http://abcnews.go.com/"><img src="http://abcnews.go.com/assets/images/navigation/abc-logo.png" /></a>
<a href="http://abcnews.go.com/"><img src="http://abcnews.go.com/assets/images/navigation/abc-logo.png" /></a>
</div>
Run Code Online (Sandbox Code Playgroud)