Activity Forums Salesforce® Discussions Can anybody suggest me the usage of jquery.noConflict()?

  • Surbhi

    Member
    June 8, 2016 at 1:33 pm

    Hi Ajit,

    jQuery.noConflict will reset the $ variable so it will no longer be an alias of jQuery. Aside from just calling it once, there's not much else you really need to do. Though, you can create your own alias with the return value.

    Thanks

  • shariq

    Member
    September 18, 2018 at 10:40 am

    Hi,

    jQuery uses the $ sign as a shortcut for jQuery.

    There are many other popular JavaScript frameworks like: Angular, Backbone, Ember, Knockout, and more.

    What if other JavaScript frameworks also use the $ sign as a shortcut?

    If two different frameworks are using the same shortcut, one of them might stop working.

    The jQuery team have already thought about this, and implemented the noConflict() method.

    The jQuery noConflict() Method
    The noConflict() method releases the hold on the $ shortcut identifier, so that other scripts can use it.

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos