![](/img/trans.png)
[英]reorder the div vertically in small screen using twitter bootstrap
[英]Bootstrap swap div for small screen
我有一個子div,在父div中具有絕對位置。
父div包含具有相對位置的Bootstrap輪播。
這是我的代碼
<div class="carousel>
Carousel goes here
<div class="col-md-6 SearchBoxHome">
content goes here
<div>
</div>
我想在小屏幕上在父div下方顯示子div。
這是我嘗試但無法正常工作的jQuery代碼。
var screenWidth = $(window).width();
if (screenWidth <= 767) {
$('.carousel').before($('.SearchBoxHome'));
} else {
return false;
}
請幫我
嘗試這個 :
var screenWidth = $(window).width();
if (screenWidth <= 767) {
var content = $('.SearchBoxHome');
$('.carousel').before(content);
$('.carousel').find('.SearchBoxHome').remove();
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.