BTW might be a good time to document the requirejs feature in XWiki Caleb? (You 
forgot to do so when you introduced it, you only added it in the release notes 
but not in the documentation) :)

Thanks
-Vincent

On 4 Dec 2013 at 17:33:08, Ruben M. ([email protected]) wrote:

Hi Caleb, 

Thanks for your quick answer. 

Thanks for your hint with require.js, it seems to be an interesting concept, 
though it might be beyond my js-skills :-) But i think i'll give it a try. 

I found the following code at stackoverflow: 

(function (factory) { 
if (typeof define === 'function' && define.amd) { 
// AMD. Register as an anonymous module. 
define(['jquery'], factory); 
} else { 
// Browser globals 
factory(jQuery); 
} 
}(function ($) { 

$.fn.jqueryPlugin = function () { 
// Put your plugin code here 
}; 

})); 

Is it enough to create a js-File like that and register it in the 
javascript.vm under 'paths:', or do i have to change more things in that 
file or somewhere else? (produced errors so far...) 
I found something about jquery in the require.js in the js-folder. 

Regards, 
Ruben 



_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to