Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to install and use through NPM and Webpack #114

Open
7ochem opened this issue Aug 29, 2022 · 0 comments
Open

Trying to install and use through NPM and Webpack #114

7ochem opened this issue Aug 29, 2022 · 0 comments

Comments

@7ochem
Copy link

7ochem commented Aug 29, 2022

I'm trying to install and use jquery.maphilight through NPM and Webpack.

I'm requiring jQuery and maphilight in my package.json.

In my js file I do:

var jQuery = require("jquery");
require('maphilight');

But then $('.mymap').maphilight() doesn't work.

I tried to find out what's going on here. I found that typeof $.fn.maphilight === 'function' is false. I also found that the jQuery object that is being passed to the maphilight factory is not the same object as my jQuery object in my javascript file.

How can I get maphilight to work within my setup?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant