I am following up on a previous question, which can be found here.
After fixing the jQuery code, I decided to change the panel slider to open from the left side instead of the right. I modified the class from "cd-panel from-right" to "cd-panel from-left". While it opens successfully from the left side, I encountered an issue where the button becomes disabled after opening and cannot close the panel.
I attempted adjusting the CSS properties such as changing "left" to "right" and vice versa, but unfortunately, it did not solve the problem. On JSFiddle, the changes made in CSS only affect the position of the button.
HTML:
<div class="cd-panel from-left">
<div class="cd-panel-container">
<button href="#0" class="cd-btn btn-primary">Views</button>
<div class="cd-panel-content" ng-controller="ViewtreeCtrl">
</div>
<!-- cd-panel-content -->
</div>
<!-- cd-panel-container -->
Javascript:
jQuery(document).ready(function($){
//open the lateral panel
$('.cd-btn').on('click', function(event){
event.preventDefault();
$('.cd-panel').toggleClass('is-visible');
});
});
View JsFiddle demo here (You can review the CSS modifications on JSFiddle)