sk-content-sidebar.js 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. /*=========================================================================================
  2. File Name: content-sidebar.js
  3. Description: Invoices list datables configurations
  4. ----------------------------------------------------------------------------------------
  5. Item name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
  6. Author: PIXINVENT
  7. Author URL: http://www.themeforest.net/user/pixinvent
  8. ==========================================================================================*/
  9. $(document).ready(function() {
  10. if($(".sidebar-sticky").length){
  11. var headerNavbarHeight,
  12. footerNavbarHeight;
  13. // Header & Footer offset only for right & left sticky sidebar
  14. if($("body").hasClass('content-right-sidebar') || $("body").hasClass('content-left-sidebar')){
  15. headerNavbarHeight = $('.header-navbar').height();
  16. footerNavbarHeight = $('footer.footer').height();
  17. }
  18. // Header & Footer offset with padding for detached right & left dsticky sidebar
  19. else{
  20. headerNavbarHeight = $('.header-navbar').height()+24;
  21. footerNavbarHeight = $('footer.footer').height()+10;
  22. }
  23. $(".sidebar-sticky").sticky({
  24. topSpacing: headerNavbarHeight,
  25. bottomSpacing: footerNavbarHeight
  26. });
  27. }
  28. });