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

后端 未结 5 1802
陌清茗
陌清茗 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:42

    As an alternatie to orip's answer, you can do the following if you don't like adding scripts in the :

    
    
      
      
      
    
    

    You will avoid flickering this way because you are adding a class name to the HTML before DOM ready.

提交回复
热议问题