Two js conflict due to onload event at the same time

Greetings!! I’m new in js…I’ve searched that js cannot perform two onload event at the same time. I’ve got two sets of codes here
from and

and here is the the problem

else if(c.attachEvent){c.attachEvent(“onreadystatechange”,B),a.attachEvent(“onload”,e.ready);


else if(c.attachEvent){c.attachEvent(“onreadystatechange”,C),a.attachEvent(“onload”,e.ready);

is there any way to get rid from error? any help would be appreciated. Thanks!

I might have misunderstood the question, but there shouldn’t actually be an error. In both cases, it looks like the scripts are using the “attachEvent” method for IE6-8.

That method attaches an event listener, and there’s no restriction on how many listeners you can add to an element for any one event (even “onload”).

Further reading: JavaScript - Traditional event registration model

…Also, why are you loading two different versions of jQuery?

Do you perhaps have a sample page up somewhere?

Since that code is from the jQuery library, I would suggest removing the extra library definition and that ought to fix it. (Even so, I don’t believe you should be getting this error as whatever that latest copy of jQuery is that you included should overwrite the previous copy.)

Try removing the extra one and see how you go.

I’m new in Javascript, and I just downloaded the two tutorials from this site, I want to combine the two animation
at the same time but the bubble navigation doesn’t work properly. I searched for the solution but it says that it cant work since
there is two onload event at the same time.

Hope I’m making myself clear and right.

You should just be able to include the code in the following order:

  • jQuery Library
  • jQuery Shuffle Letters plugin
  • Code for Shuffling letters + Code for bubble navigation

Do you have an example page where your error is occurring? It might help give a better insight as to what is happening.

<!-- The JavaScript –>
<script src=“”></script>
<script type=“text/javascript” src=“jquery.easing.1.3.js”></script>

&lt;script src=""&gt;&lt;/script&gt;
&lt;script src="jquery.shuffleLetters.js"&gt;&lt;/script&gt;
    &lt;script src="script.js"&gt;&lt;/script&gt;

The first two are the scripts for bubble navigation
the latter are scripts for the shuffle letters.

<script src=""></script>

Leave that one out, it’s overwriting the first library and the easing plugin.

You only ever have to include the jQuery library once per page.

thank you very much. It worked now. Looking forward to learn more.