このコード行を Coffeescript でどのように記述できますか? ありがとう
window.scrollY >= origOffsetY ? navbar.classList.add('navbar-fixed-top') :
navbar.classList.remove('navbar-fixed-top');
これを試してみましたが、うまくいきません。
if window.scrollY >= origOffsetY then navbar.classList.add('navbar-fixed-top') else navbar.classList.remove('navbar-fixed-top')