Solutions to conflicts between Transport.js and jquery in Ecshop

Source: Internet
Author: User

jQuery and Global.js conflict

Baidu and Google many times, according to most of the online recommendations and their own testing,
SolveThe approach is as follows:Remove 10-13 lines of global.js or global.js file masking
Object.prototype.extend = function (object)
//{
Return Object.extend.apply (this, [this, Object]);
//}
And hope that people on the official website can explain the actual use of the Global.js file, the above solution affects the platform does not

Add the following code to the last side of the HTML file:

?
1234567 <script type="text/javascript"src="jquery-1.7.2.min.js"></script><script type="text/javascript">$(function() {window.__Object_toJSONString = Object.prototype.toJSONString;deleteObject.prototype.toJSONString;});</script>

The order of the code in the file:

Import the Transport.js file first

?
1 {insert_scripts files="../js/transport.js,../js/region.js"}

Then import the jquery file

?
1 <scripttype="text/javascript"src="jquery-1.7.2.min.js"></script>

Plus this piece of code

?
123456 <script type="text/javascript">$(function() {window.__Object_toJSONString = Object.prototype.toJSONString;deleteObject.prototype.toJSONString;});</script>

Finally, I introduce my own JS file written in jquery:

?
1 <scripttype="text/javascript" src="main.js"></script>

Solutions to conflicts between Transport.js and jquery in Ecshop

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.