What is wrong with the following code?
I need to detect and set width of 1 element based on if another element has scrollbar or not. this seems not working:
console.log("print Scroll..here...");
if(($(".printer-details-container").offsetHeight < $(".printer-details-container").scrollHeight) || ($(".printer-details-container").offsetWidth < $(".printer-details-container").scrollWidth)){
      // your element have overflow
      console.log("print Scroll..here...");
      $(".printer-header").css({"width":"96.9999%;"});
 }
 else{
      //your element don't have overflow
      console.log("no print Scroll..here...");
      $(".printer-header").css({"width":"100%;"});
      //console.log($(".printer-header").print-header.css({"width":"100%;"});
 }
 
     
    