I have a project that is a massive website, and I was brought in to make the website responsive. I went with bootstrap for the framework, and quickly ran into issues with the jQuery version being used (v1.8.2). I solved my issues in a development environment by adding the following script references:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
I using $.noConflict(); but I do not believe it was in the correct spot. I called it after the three script references (old jquery, new jquery and jquery migrate). When we built the website to a staging environment, I am getting several script errors.
I read other questions similar to this, and found the following code:
<script src='jquery-1.6.2.js'></script>
<script>
var jq162 = jQuery.noConflict();
</script>
<script src='jquery-1.9.1.js'></script>
<script>
var jq191 = jQuery.noConflict();
</script>
This does not use the migrate script. I have also seen the opposite where .noConflict is not called and only the migrate script is used.
Is one method considered better than the other? Or do I need to use both?
I am getting several script errors
? show one or some of those errors please. and did you read some of this: api.jquery.com/jquery.noconflict ?noConflict()
has nothing to do with newer or older versions ofjQuery
but why should I tell if read the docs ... while reading this github.com/jquery/jquery-migrate I would just loadONE
jQuery version and the migrate ...