Variable scope issue with javascript function

后端 未结 4 618
滥情空心
滥情空心 2021-01-17 02:43

I am trying to create a function with spin.js. The function loads the spinner, then if it is called again with it argument, then it stops the spinner. I can\'t get the varia

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-17 03:13

    Move "var theSubmitSpinner;" outside the function: http://jsfiddle.net/nXbaz/

提交回复
热议问题