i want to remove all the functions and variables that the script defines.
On Apr 4, 12:08 am, hj <[EMAIL PROTECTED]> wrote: > > I have added a js file in my html file. > > <script src="test.js" language="JavaScript"></script> > > > I want to remove the script from my file using jQuery. > > I have tried using the following > > jQuery('script[src="test.js"]').remove(); > > But the script is not getting removed. > > Do you want to remove the script, or the functions and variables > that it defines? To remove the script element, try: > > jQuery('script[src*=test.js]').remove(); > > But that will only remove the element from the DOM; all the functions > and variables it defines will still exists. > > -- > > hj