Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
Hi.
We should be able to use our existing jQuery instance, instead of loading this double.
But this would require wrapping all KoolReport careless usages of $
variable into proper form:
(function($) {
...
} )(jQuery || {});
For example, DrillDown package is full of unguarded $
usage.
Your thoughts?
Actually if you see the rendered code of any widget, you will see that the widget will trying to get jquery and until jquery is on the page, then a callback function will be called to initiate the widgets. If the jquery is presented then the script will run immediately. This does not require you to even add the jQuery on report. However, you may add jQuery to make sure.
This new loading method in KoolReport open the chance that you may use any widgets of KoolReport in your application even without setting up a report. For example, in laravel view template, you may just call google chart widget and enter the Collections to dataSource, the chart will show and fully function.
WordPress core specifically sets jQuery.noConflict()
as platform default, since many many years ago. $
not existing is OK and expected.
AFAICS there's a relatively simple and safe path to handling both scenarios in KoolReport, as I described above (wrap into closures). Other than work time associated, is there any technical reason why it couldn't happen?
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo