Could I use it in npm (node js)?
Closed this issue · 9 comments
Could I use it in npm (node js)?
Well, I think npm is more suitable for server-side packages, while LoadingOverlay is a client-side jQuery plugin, so a CDN would be a better option.
I've already submitted a request to publish it in jsDelivr CDN, I think it's a matter of days before you will be able to include LoadingOverlay in your project using that CDN.
It might also be useful to submit this project to bower. I use gulp to manage resources, and pulling up to date packages directly from bower makes the whole process a lot easier.
I had completely forgot about this thread, my bad!
In the meanwhile I've got some jQuery libraries of mine accepted by jsDelivr, but I haven't found the time to upgrade the documentation on my website to include the references yet.
You can inlcude the latest jQuery LoadingOverlay version using the CDN link in a <script>
tag:
//cdn.jsdelivr.net/jquery.loadingoverlay/latest/loadingoverlay.min.js
Or, in alternative, request a specific version like that:
//cdn.jsdelivr.net/jquery.loadingoverlay/1.4.1/loadingoverlay.min.js
I'm not very fond of bower and similar repositories when it comes to client side libraries, but I will surely look into it.
Here you go:
npm
npm install gasparesganga-jquery-loading-overlay
Bower
bower install gasparesganga-jquery-loading-overlay
I tried use it in Meteor JS
.
Uncaught TypeError: $.LoadingOverlay is not a function(…)
But don't know how to import/required.
Please help me.
Please provide some details about the code you are using. Are you sure you have included jQuery and LoadingOverlay in you HTML template?
I'm no Meteor expert, I think the best option is asking a question on StackOverflow where many experienced people will be able to help you with your code.
Could I use import
or not?
import {$} from 'meteor/jquery';
import 'gasparesganga-jquery-loading-overlay';
Template.test.events({
'click .js-loading' (event, instance) {
$.LoadingOverlay("show");
}
I've got absolutely no idea since I've never used Meteor.
Please refer to meteor documentation or, as I suggested before, ask a question on specialized communities like Stackoverflow.