tags:

views:

30

answers:

2

Do you know any cross-browser methods?

+2  A: 

There aren't any way working cross browser (IE is the problem, as always), sorry

marcgg
I do not believe there is no way.
Ale Anderson
A: 
window.scrollBarWidth = function() { 
  document.body.style.overflow = 'hidden';  
  var width = document.body.clientWidth; 
  document.body.style.overflow = 'scroll';  
  width -= document.body.clientWidth;  
  if(!width) width = document.body.offsetWidth - document.body.clientWidth; 
  document.body.style.overflow = '';  
  return width;  
}
valli
Does that work well crossbrowser? Under what browser has this code been tested?
marcgg