UPDATES EasyBlog 6.0.14 Released! Joomla 5.x and PHP 8.x compatible now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online

implement an external library e.g. context menu

Gregor de Lijzer · ·
1:15 PM Tuesday, 15 November 2016
Normal
Going further with my project i want to implement context menu functionality!
Therefore i downloaded a library from https://swisnl.github.io/jQuery-contextMenu/

i included it in my default.js file in .../apps/assets/scripts like

EasySocial.require()
.library('ui/resizable', 'ui/draggable', 'ui/selectable', 'moment')
.script(''<?php echo rtrim( JURI::root() , '/' );?>/media/com_easysocial/apps/group/planner/assets/scripts/context-menu/src/jquery.contextMenu.js',
'<?php echo rtrim( JURI::root() , '/' );?>/media/com_easysocial/apps/group/planner/assets/scripts/context-menu/screen.js',
'<?php echo rtrim( JURI::root() , '/' );?>/media/com_easysocial/apps/group/planner/assets/scripts/context-menu/prettify/prettify.js').done(function($) {
$.contextMenu({
selector: 'span.context-menu'
});
}


But mixing external libraries with ES seems not quite easy!
By running the script above it gives me
TypeError: $.contextMenu is not a function


Do i have to adapt external libraries for using in ES?

Thanks and good morning from Vienna
The replies under this section are restricted to logged in users or users with an active subscription with us