If you want to integrate liferay 7 theme/portlet/application with jQuery UI, you need to make subtle change in jQuery UI library itself.
By default library starts with -
If you add library directly in your liferay application, you will be getting an error - Mismatched anonymous define() module:
To overcome this issue, you need to change the library like
What you are doing is removing the reference of define call, which causes the issue, as jQuery is already loaded by default.
Same thing you need to perform for other JS libraries which contains the call.
You are just done, Try & Enjoy the function.............:)
By default library starts with -
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
If you add library directly in your liferay application, you will be getting an error - Mismatched anonymous define() module:
To overcome this issue, you need to change the library like
(function( factory ) { factory( jQuery ); }(function( $ ) {
What you are doing is removing the reference of define call, which causes the issue, as jQuery is already loaded by default.
Same thing you need to perform for other JS libraries which contains the call.
You are just done, Try & Enjoy the function.............:)