Commit Graph

2 Commits

Author SHA1 Message Date
Michał Gołębiowski-Owczarek
600057f59c
Demos: Make autocomplete demos work on jqueryui.com
The `jqueryui.com` demos build process deAMDifies HTML files, replacing required
JS files with direct script tags. On the other hand, when running demos locally
from the jQuery UI repository, RequireJS is used.

This used to work fine until we got a new `search.js` file introduced in
gh-2187. The deAMDifying process doesn't touch non-HTML files which made loading
autocomplete demos crash on "require is not a function"

To resolve the issues without a major rearchitecture of the build process,
the `search.js` file now detects AMD and uses `require`, falling back to relying
on the `jQuery` global in the other case.

Closes gh-2274
Ref gh-2187
Ref jquery/jqueryui.com#216
2024-07-30 08:31:10 +02:00
Timo Tijhof
604aae1a57
demos: Replace search.php with $.ajaxTransport() mock
Fixes jquery/jqueryui.com#203
Closes gh-2187
2024-01-03 01:31:36 +01:00