jQuery - function runs fine when fired on div click, but not on page load

后端 未结 5 968
[愿得一人]
[愿得一人] 2021-01-25 17:49

I have the following function that I want to run on page load and re-run when you click div#trigger. When you click div#trigger everything is fine. However on page load the code

5条回答
  •  Happy的楠姐
    2021-01-25 18:33

    If you already are calling textIndendFunc in $(document).ready and is still not getting what you're expecting, try moving textIndentFunc to $(window).load.

提交回复
热议问题