How to execute Jquery code only once??

后端 未结 9 2088
梦谈多话
梦谈多话 2020-12-16 15:52

I have one jquery method and i used call that method on click of a button . So in that code i have one line \" $(\"#loadingMessage\").css(\'padding-top\',\'6%\');

9条回答
  •  鱼传尺愫
    2020-12-16 16:43

    you can use bolean in all languages.

    in jquery:

    var isFirst = true;
    
    if(isFirst){  
    $("#loadingMessage").css('padding-top','6%');  
    isFirst=false;  
    }
    

提交回复
热议问题