14 lines
411 B
JavaScript
14 lines
411 B
JavaScript
jQuery(document).ready(function($){
|
|
//open the lateral panel
|
|
$('.cd-btn').on('click', function(event){
|
|
event.preventDefault();
|
|
$('.cd-panel').addClass('is-visible');
|
|
});
|
|
//clode the lateral panel
|
|
$('.cd-panel').on('click', function(event){
|
|
if( $(event.target).is('.cd-panel') || $(event.target).is('.cd-close') ) {
|
|
$('.cd-panel').removeClass('is-visible');
|
|
event.preventDefault();
|
|
}
|
|
});
|
|
}); |