我试图让bootstrap div成为全身长.
这是我到目前为止所尝试的:http: //jsfiddle.net/bKsad/315/
html, body {
min-height: 100%
}
.wrap {
height: 100%
}
.sidebar {
background-color:#eee;
background-repeat: repeat;
padding:0;
min-height:100% !important;
position:relative;
}
.sidebar .sidebar-content {
height:100%;
width:100%;
padding: 5px;
margin:0;
position:relative;
}
Run Code Online (Sandbox Code Playgroud)
随着右栏的长度增长,我希望侧栏也能做同样的事情.
我从API获取vimeo缩略图,我正在使用jQuery函数将数据附加到dom.
我正在尝试访问ajax之外的thumb_url,所以我可以将它返回给jQuery,但它不起作用.
function getThumb(vimeoVideoID) {
var thumb_url;
$.ajax({
type: 'GET',
url: 'http://vimeo.com/api/v2/video/' + vimeoVideoID + '.json',
jsonp: 'callback',
dataType: 'jsonp',
success: function (data) {
console.log(data[0].thumbnail_large);
thumb_url = data[0].thumbnail_large;
}
});
return thumb_url;
}
$('.video').each(function () {
var thumb_url = getThumb(this.id);
$(this).append('<img src="' + thumb_url + '" class="video_preview"/>');
});
Run Code Online (Sandbox Code Playgroud)
小提琴:http://jsfiddle.net/gyQS4/2/ 求助?