Conflict between jquery and min-jquery

Asked

Viewed 389 times

0

I’m in trouble, because my code is giving conflict with the minjquery, I do not know what happens, when I put it all my other codes that I have do not work.... Help me please!

http://www.redepurple.com.br/social/Code/chatjs/jquery.js

Thank you all for the help, I decided to put the latest version of Jquery, which was the only one that worked with all the scripts together, and I also took another one that was giving "conflict" of another plugin.

  • 1

    Are you putting the two at once or is it when you put the .min troublesome ?

  • Why use both?

  • The min I use in my other project, and the jquery I use in a chat. When I take out jquery, my other project works, when I stop working. And then I’m in this, not knowing what to do

  • Please, people really wanted it to work :\

  • And so, what stops working is a basic Jquery, like sending a POST form, simple things, weird...

  • There’s something wrong with your console when you take off jQuery 1.3?

  • Look do not know what is console, but what happens is that everything stops working, when I send a message the refresh page instead of working to Function

  • @Tenaandrade we go slow. Put the .min jQuery on the page, save. Then open your page in the browser, press CTRL SHIFT J on the keyboard. Opens an Info Console. Refresh the page and see what error it gives. But Sergio is probably right, you’re putting one library on top of the other.

  • 1

    Thanks gorgeous @Gumball gives it: VM2515:1 Uncaught Referenceerror: scrollcode is not defined

  • Haaaa @Tenaandrade. You may be placing the script under the other codes. The .min has to be everyone’s first script. Then comes the script from scrollcode. That’s what I imagine for now...

Show 5 more comments

3 answers

3

From what I see on your page you are loading jQuery 1.3, 1.7 and 2.0 in different places, it generates conflicts and you only really need one of them. Whatever conflicts is probably because you have old code, changing that code the problem should be solved. It is never good to load different versions from the same library.

Leaves only the most modern jQuery (2.0) and puts here on the site new questions you may have with any errors you see in the console have on the console.

What could be your problem is that different pages pick up jQuery from different directories. In this case there is no library overlay and, although it is always good to use more modern versions, it is not urgent to change and can work with both.

What date do you have

<script src="assets/plugins/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script> // jQuery v1.7.2

and still this link you indicate in the question with http://www.redepurple.com.br/social/Code/chatjs/jquery.js, which is version 1.3...

If you want more help than this you have to specify which page gives problems and put here the HTML of that page. The ideal is to isolate the code that does not work and show here only this.

3

The version . min is not a version with reduced features, but rather compressed, that is, it is lighter to load, but has all the features of the uncompressed version, in general you use the full versions in development environments, because they have some debug features and can be analyzed more easily in case of errors and problems, and use the versions. min in production environment, to be lighter to load and not show error messages.

You should not load multiple versions of jquery on top of each other, choose one to work with and only load it. In new projects I advise using the latest version and in case some plugin/add-on (like your chat) does not work properly, load the plugin migrate.

1

I was taking a look at your source code and I found what’s probably the problem.

See in the image below:

inserir a descrição da imagem aqui

I think this might be the page you’re making. In this case see that the plugin jQuery is after the Jquery Form.

It has to come first. Actually, jQuery or jQuery Min has to come first, before any other plugin that uses jQuery. It would be good if you put these scripts before closing the tag </body>.

If it’s not this page, show us how the source code is (not all) only the part of the scripts, which is in trouble.

Browser other questions tagged

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