How to detect which js file is being used by the class of an element?

Asked

Viewed 285 times

3

I am trying to check which files can be used by the class of a particular element. Example:

<script src="arquivo1.js"></script>
<script src="arquivo2.js"></script>
<script src="arquivo3.js"></script>
<script src="arquivo4.js"></script>
<script src="arquivo5.js"></script>

<div class="classe1">...</div>

Assuming div has jquery effects that use its "Classe1" class, as I might know, which of the above files has (creates) this effect? I tried for the element inspecter, but I couldn’t.

I intend to do this because I have a very cool effect and I want to do exactly that of the file I own, but I have a lot and I couldn’t figure out how the particular effect works.

1 answer

0

You can search inside the files by $(".classe1") or document.getElementByClass("classe1").

You can also comment on all other files by leaving only one uncommented, or comment one by one on whether the effect ceases to happen.

<! --
<script src="arquivo1.js"></script>
<script src="arquivo2.js"></script>
<script src="arquivo3.js"></script>
<script src="arquivo4.js"></script>
-->
<script src="arquivo5.js"></script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.