correct hover behavior
This commit is contained in:
16
static/js/menu.js
Normal file
16
static/js/menu.js
Normal file
@@ -0,0 +1,16 @@
|
||||
$(document).ready(function(){
|
||||
var accordionsMenu = $('.cd-accordion-menu');
|
||||
|
||||
if( accordionsMenu.length > 0 ) {
|
||||
|
||||
accordionsMenu.each(function(){
|
||||
var accordion = $(this);
|
||||
//detect change in the input[type="checkbox"] value
|
||||
accordion.on('change', 'input[type="checkbox"]', function(){
|
||||
var checkbox = $(this);
|
||||
console.log(checkbox.prop('checked'));
|
||||
( checkbox.prop('checked') ) ? checkbox.siblings('ul').attr('style', 'display:none;').slideDown(300) : checkbox.siblings('ul').attr('style', 'display:block;').slideUp(300);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user