How to Hide DIVs, they are Showing for a Split Second on page Load

后端 未结 5 1773
陌清茗
陌清茗 2021-01-05 19:19

I have made a very quick jQuery slideshow, and I\'m using this to hide the DIVs which shouldn\'t be shown until it\'s their turn:

$(document).ready(function(         


        
5条回答
  •  别那么骄傲
    2021-01-05 19:44

    Yes, it's certainly acceptable to do it in your CSS

    The other respondents are correct. It's not a good practice to make things only visible with JS. I guess I was just thinking technically : changing your CSS this way would solve the issue.

提交回复
热议问题