Javascript function conflict and overwriting when jQuery Mobile loads the dialog box page with the same name

Source: Internet
Author: User

Javascript function conflict and coverage issues when loading the dialog box page of jQuery Mobile version: jQuery Mobile 1.1.0/1.2.0 Problem description: There are two pages main. cshtml and dialog. cshtml. Both pages are Based on. NET MVC4 and use the default template _ layout. cshtml. On the main. cshtm page, load the data list using javascript. Click the link to bring up the dialog. cshtml page in the form of a dialog box, and load data using javascript on the dialog. cshtml page. The dialog box is closed and the javascript function on main. cshtml is unavailable! Experiment shows that this is because jQuery Mobile loads pages using ajax, resulting in a conflict between javascript Functions with the same name on two pages! The content of the _ layout. cshtml template in. net mvc 4 is as follows: [html] <! DOCTYPE html>

Related Article

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.