JQuery Scroll detection fire once

前端 未结 2 1913
孤城傲影
孤城傲影 2021-01-06 01:12

I have a small piece of JQuery designed to collapse my header, change its dimensions, and then stick it to the side of the screen. It all works apart from one part, the heig

2条回答
  •  臣服心动
    2021-01-06 01:33

    look at jquery's one() functionality http://api.jquery.com/one/

    It will only fire once and then promptly remove itself..

提交回复
热议问题