333 posts
  • Has referred 100+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 50+ items on Envato Market
+5 more
vtimbuc says

Hi guys,

I’m working on a website that was build with requireJS, I’ve never worked with this framework and I need to add some inline jQuery code on the file and I can’t get it to work.

<script src="static/site/js/lib/require.js" data-main="static/site/js/ash.js"></script>

The code is being loaded this way. Then I’ve tried to add my inline code like this but none worked.

<script>
require(['jquery'], function($) {
  ...
});

define(['jquery'], function($) {
  ...
});
</script>

Does any one know how can I do it?

Thanks

by
by
by
by
by
by