最近用jquery ui progressbar 遇到问题。 所有的demo里都没有用 api里写的destory方法。但是我现在想在结束的时候直接销毁掉progressbar,有人有demo用过destory方法的么?
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>progressbar demo</title> <link rel="stylesheet" href="http://code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css"> <script src="http://code.jquery.com/jquery-1.12.4.js"></script> <script src="http://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> </head> <body> <div id="progressbar"></div> <script> $("#progressbar").progressbar({ value: false }); setTimeout(function() { $("#progressbar").progressbar('destroy'); }, 5000); </script> </body> </html>