Search code examples
alpacajs

Is it possible to use Alpaca Forms without jquery?


I am trying to integrate Alpaca Forms into Alfresco Share, but I have a problem trying to add jQuery as a dependency, as the plataform already includes jQuery as a dependency, but an old version, so including this new one just for Alpaca will create problems.

Is there any way to use Alpaca without jQuery, doing all the initialization and configuration using pure javascript?


Solution

  • There's no way to use Alpaca without jQuery, you can see it yourself in alpaca functions ... but you can use many jquery versions with no conflict using jQuery.noConflict( true )

    I made a fiddle for that, it uses jQuery version 2.2.4 for alpaca and I loaded jquery version 1.2.3 too. To use the first version of jQuery use the $ sign, for the other version use the variable mapped to a variable like var jquery123 = jQuery.noConflict( true ); jquery123.[some_function]

    Link to the fiddle