add public design files
This commit is contained in:
29
design/carheart/js/collapse-panel.js
Normal file
29
design/carheart/js/collapse-panel.js
Normal file
@@ -0,0 +1,29 @@
|
||||
(function($) {
|
||||
$.fn.panels = function() {
|
||||
$this = $(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();
|
||||
if ($('.container').width() < 940){
|
||||
$('.panel-body').hide();
|
||||
} else {
|
||||
$('.panel-body').show();
|
||||
}
|
||||
});
|
||||
|
||||
//$(window).resize(function() {
|
||||
// if ($('.container').width() < 940){
|
||||
// $('.panel-body').hide();
|
||||
// } else {
|
||||
// $('.panel-body').show();
|
||||
// }
|
||||
//});
|
||||
Reference in New Issue
Block a user