48 lines
1.5 KiB
JavaScript
48 lines
1.5 KiB
JavaScript
|
|
(function($) {
|
||
|
|
$.fn.panels = function() {
|
||
|
|
$this = $(this); console.log($this)
|
||
|
|
$(this).find('.panel-body').hide();
|
||
|
|
$(this).find('.panel-title').prepend('<div class="pull-right collapse-button"><span class="glyphicon glyphicon-menu-hamburger"></span></div>');
|
||
|
|
$(this).each(function() {
|
||
|
|
$(this).find('.collapse-button').css('cursor','pointer').click(function() {
|
||
|
|
$this.find('.panel-body').slideToggle('fast');
|
||
|
|
});
|
||
|
|
});
|
||
|
|
};
|
||
|
|
})(jQuery);
|
||
|
|
|
||
|
|
|
||
|
|
$(document).ready(function() {
|
||
|
|
//$('.collapse-panel').panels();
|
||
|
|
|
||
|
|
$('.collapse-panel').each(function(){
|
||
|
|
var $el = $(this);
|
||
|
|
$el.find('.panel-body').hide();
|
||
|
|
$el.find('.panel-title').prepend('<div class="pull-right collapse-button"><span class="glyphicon glyphicon-menu-hamburger"></span></div>');
|
||
|
|
|
||
|
|
$el.find('.collapse-button').css('cursor','pointer').click(function() {
|
||
|
|
$el.find('.panel-body').slideToggle('fast');
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
if ($('.container').width() < 940){
|
||
|
|
$('.panel-body').hide();
|
||
|
|
} else {
|
||
|
|
$('.panel-body').show();
|
||
|
|
}
|
||
|
|
|
||
|
|
if($('.services-mobile-menu li.active').length){
|
||
|
|
$('.services-mobile-menu .panel-body').show();
|
||
|
|
$('.services-mobile-menu li.active>ul').show();
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
//$(window).resize(function() {
|
||
|
|
// if ($('.container').width() < 940){
|
||
|
|
// $('.panel-body').hide();
|
||
|
|
// } else {
|
||
|
|
// $('.panel-body').show();
|
||
|
|
// }
|
||
|
|
//});
|