Why can't github pages support jquery button click?

No problem on this machine and on my own server

your own server

github pages


your own code is loaded asynchronously with rocket.min.js, and its execution is deferred until after Dom generation.
, while on github, js, runs $('- sharpxxx') directly before dom loads.
put your code in $(document). Ready (function () {.})


I figured out that cloudflare.com will automatically give it to my website

add rocket.min.js

so my server has the asynchronous loading function mentioned above

Menu