Featured post

Docker setup for Liferay 7 with MySQL

Wednesday, 26 October 2016

jQuery UI with Liferay 7

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 -

(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.............:)

9 comments:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from JQuery Training in Chennai . or learn thru JQuery Training . or learn thru ES6 Online Training. Nowadays JavaScript has tons of job opportunities on various vertical industry.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Pretty blog, so many ideas in a single site, thanks for the informative article, keep updating more article.
    Webdesining course in chennai

    ReplyDelete
  4. Appreciating the persistence you put into your blog and detailed information you provide


    Selenium training in Chennai

    Selenium training in Bangalore

    ReplyDelete
  5. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing..
    Believe me I did wrote an post about tutorials for beginners with reference of your blog. 




    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  6. thanks for your information really good and very nice web design company in velachery

    ReplyDelete
  7. I’m really happy to say it was an interesting post to read. I learned new information from your article, you are doing a great job. Continue
    Thanks & Regards,
    SAP Training in Bangalore

    ReplyDelete