$(window).on('scroll', function (event) {
var scrollValue = $(window).scrollTop();
if (scrollValue > 150) {
$('.navbar').addClass('newclass');
} else{
$('.navbar').removeClass(newclass');
}
});
.popover {min-width:300px;max-width:800px;}
<script>
$(function () {
$('[data-toggle="popover"]').popover()
})
</script>
<script>
$('[data-toggle="popover"]').popover({
html: true
})
</script>
$('.modal-backdrop').on('click', function(e) {
$('#exampleModal<?php echo $product_id ?>').modal('hide');
$('#exampleModal<?php echo $product_id ?>').hide();
$('.modal-backdrop').hide();
});
$('.modal').on("hidden.bs.modal", function (e) {
if($('.modal:visible').length)
{
$('.modal-backdrop').first().css('z-index', parseInt($('.modal:visible').last().css('z-index')) - 10);
$('body').addClass('modal-open');
}
}).on("show.bs.modal", function (e) {
if($('.modal:visible').length)
{
$('.modal-backdrop.in').first().css('z-index', parseInt($('.modal:visible').last().css('z-index')) + 10);
$(this).css('z-index', parseInt($('.modal-backdrop.in').first().css('z-index')) + 10);
}
});
$(document).ready(function(){
$('.modal').on('show.bs.modal', function () {
if ($(document).height() > $(window).height()) {
// no-scroll
$('body').addClass("modal-open-noscroll");
}
else {
$('body').removeClass("modal-open-noscroll");
}
})
$('.modal').on('hide.bs.modal', function () {
$('body').removeClass("modal-open-noscroll");
})
})
body.modal-open-noscroll {
margin-right: 0!important;
overflow: hidden;
}
.modal-open-noscroll .navbar-fixed-top, .modal-open .navbar-fixed-bottom {
margin-right: 0!important;
}
<div class="col-md-2 col-md-push-9 social clearfix">
<div class="facebook"><a href="#"><img src="_done_job_/app/img/social/facebook.svg" alt="Фейсбук"></a></div>
<div class="twiter"><a href="#"><img src="_done_job_/app/img/social/twitter.svg" alt="Твитер"></a></div>
<div class="vk"><a href="#"><img src="_done_job_/app/img/social/vk.svg" alt="ВК"></a></div>
</div>
.social > div {float:left;margin-left:5px;}
pull-right
<div class="navbar pull-right"></div>
$("#getSliderImages").click(function () {
$("#carousel-example-generic").load();
});