Why is FF on OS X losing jQuery-UI in click event handler?

后端 未结 1 1069
既然无缘
既然无缘 2021-01-27 00:27

In a web page using jQUery 1.7.1 and jQUery-UI 1.8.18, if I output $.ui in an alert box when the document is ready, I get [object Object]. However when using Firefox, if I outpu

相关标签:
1条回答
  • 2021-01-27 01:01

    I think you must have an add-on in your Firefox installation on OSX which is mucking about with the page; specifically, I think it's loading a compressed version of jQuery into the page after page load, which is a strange thing to do but explains the behavior you're seeing. Your alert of the $ function clearly shows it changing from an uncompressed version (return new jQuery.fn.init(selector, context, rootjQuery);) into a compressed version (return new d.fn.init(a, b, g);), and re-loading jQuery would replace $ with a completely new version, which means jQuery UI's additions would be gone from it. E.g., something loading a compressed jQuery after page load fits the symptoms.

    Absent an add-on (or malware, I suppose) doing that, there's no reason that $ or $.ui would get redefined with the page you posted, and I've now tried it on Chrome 17, Firefox 11, and Opera 11 on Linux (Ubuntu 11.10) as well as IE9, Firefox 5, Safari 5, and Opera 11 on Windows 7. They all work as expected.

    I'd disable all add-ons and try again. If it still happens, I'd completely wipe Firefox from the machine and reinstall from scratch.

    0 讨论(0)
提交回复
热议问题