JQuery UI dialog - *Dialog not a function* error

前端 未结 7 581
天命终不由人
天命终不由人 2021-01-01 17:35

I am developing a site using pinax. In one of my templates I am trying to open a simple jquery dialog box. However I keep getting the \"Dialog not a function\" javascript er

7条回答
  •  一生所求
    2021-01-01 17:48

    Under certain circumstances you can get this error if multible and different JQuery version are loaded at the same time.

    In my case I has a ASP page that used a master. My master was including JQuery 1.4.2.min My aspx page I included JQuery 1.7.2.min

    When JQuery functions were called from a control, it got confused about which JQuery to use so even though that script could state that JQuery was loaded ( it could display the JQuery version ), it failed to find any JQuery functions.

    When I removed my local JQuery 1.7.2.min inclusion out of my aspx file, and updated my mater from 1.4.2.min to 1.7.2.min, the problem went away.

提交回复
热议问题