jQuery(document).ready(function($) {

    var direction = localStorage.getItem('direction');
    if (direction) {
        $('body').attr('dir', direction);
    }


    $('#rtl-ltr-toggler-btn').click(function() {
        var currentDirection = $('body').attr('dir');
        var newDirection = currentDirection === 'rtl' ? 'ltr' : 'rtl';
        $('body').attr('dir', newDirection);
        localStorage.setItem('direction', newDirection);
    });
});