0

I am working in Dreamweaver CS4 and implemented JQuery code that I found online for a gallery function. I am only using a very small part of the gallery functions available, and would like to delete the unused script in order to get more clarity and a cleaner script. But as a JavaScript beginner I can't identify what is important and what is not. My question: Is there a way in Dreamweaver to view/highlight the JS code that the site is using? I am imagining a tool that you could turn on when running the live view that would visualize the portions of code that is being used. Or, the other way round, is there a way to highlight the unused code. The live code button doesn't seem to do this. Thanks for your help!

  • It does not sound like you are using just jQuery because jQuery doesn't come with gallery functions. Even then, I don't believe there is a tool like that in Dreamweaver. Try checking out this other Stack Overflow thread though: [link](http://stackoverflow.com/questions/1169889/find-unused-javascript-functions) or [link](http://stackoverflow.com/questions/1167663/is-there-a-tool-to-remove-unused-methods-in-javascript). They recommend a few things like JSLint and other ways. – Paul Sham Mar 27 '11 at 07:20

1 Answers1

0

My question: Is there a way in Dreamweaver to view/highlight the JS code that the site is using?

No. You would need to use Firebug or a similar javascript tracker/debugger to see how the code is used. The most DW will tell you is which external files are linked to a page.

JCL1178
  • 1,155
  • 1
  • 10
  • 31