Menu icon Foundation

Designer

My Posts


My Comments

Petr Ogurcak commented on Frank Wronson's post 3 months

Is tjhere  a way how to check if plugins is initialized? 
I have the same problem with 
$(window).on('load', function(){
Foundation.reInit('equalizer');
});
as on same pages there is no equalizer and I get error 
We're sorry, '_init' is not an available method for this element.

Petr Ogurcak commented on Martin's post about 1 year

this is how our app.js looks like
import $ from 'jquery';
import whatInput from 'what-input';

window.$ = $;
window.jQuery = $;

//import Foundation from 'foundation-sites';
// If you want to pick and choose which modules to include, comment out the above and uncomment
// the line below
import './lib/foundation-explicit-pieces';

//import libs from './lib/dependencies';

//window.libs = libs;

var Nette = window.Nette = require('nette-forms');
Nette.initOnLoad();
require('nette.ajax.js');
require('owl.carousel');

$(document).foundation();

Petr Ogurcak commented on Arshavski Alexander's post over 1 year

Is there a way to do the opposite? To have all accordions on load?

Petr Ogurcak commented on Martin's post over 1 year

we run into other issues and I can't find anything on that topic in the forum or in the documentation.
 
I installed two nonmodular scripts. nette.ajax.js and nette-forms
 
Their paths are 
 
node_moudles/nette.ajax.js/nette.ajax.js
 
and when I require it  require('nette.ajax.js'); It works
 
but for nette-forms with the path node_modules/nette-forms/src/assets/netteForms.js
require('nette-forms'); doesn't work.
 
When copying the file to js folder and require it require('./netteForms.js'); It works.
 
 
But I run into issues with a non-defined variable which is defined in one of the files. I assume webpack load them asynchronously so the variable is not defined.
 
Another question is.. when I add the paths to config.yml like this:
 

  # Paths to JavaScript entry points for webpack to bundle modules
  entries:
    - "node_modules/nette.ajax.js/nette.ajax.js"
    - "node_modules/nette-forms/src/assets/netteForms.js"
    - "src/assets/js/app.js"

 
It generates 3 files. Should I have all the scripts in one generated files? Or it's meant to load all the files separately? If so, do I have to load jquery again? As it a part of app.js file.

Petr Ogurcak commented on Petr Ogurcak's post over 1 year
Petr Ogurcak commented on Matthew Andrianakos's post over 1 year

I run into the same issues is there any documentation how javascripts and jquery should be added into foundation 6.4?

Petr Ogurcak commented on Tony Tyson's post over 1 year

@Rafi, I run into some issues with the instructions there http://foundation.zurb.com/forum/posts/53526#comment_39031 Please can you have a look? Are you going to write some documentation how to install javascripts plugin via npm / yarn and webpack ?

Petr Ogurcak commented on Martin's post over 1 year

I have the same issue.. 
- I installed for example nette.ajax.js via yarn
- added it to config.yml
entries:
- "node_modules/nette.ajax.js/nette.ajax.js"
- created assets/js/lib/dependencies.js
// custom dependencies
import nette_ajax from 'nette.ajax.js';

const deps = {

nette_ajax: nette_ajax

};

module.exports = deps;
 
- added this piece of code to app.js
import $ from 'jquery';
import whatInput from 'what-input';

window.$ = $;

//import Foundation from 'foundation-sites';
// If you want to pick and choose which modules to include, comment out the above and uncomment
// the line below
import './lib/foundation-explicit-pieces';

import libs from './lib/dependencies';

window.libs = libs;

$(document).foundation();
 
and I run into this issue
jQuery is missing, load it please
 
Why is it happening? What's wrong? Is there any tutorial how to do that?

Petr Ogurcak commented on Martin's post over 1 year

I have the same issue.. 
- I installed for example nette.ajax.js via yarn
- added it to config.yml
entries:
- "node_modules/nette.ajax.js/nette.ajax.js"
- created assets/js/lib/dependencies.js
// custom dependencies
import nette_ajax from 'nette.ajax.js';

const deps = {

nette_ajax: nette_ajax

};

module.exports = deps;
 
- added this piece of code to app.js
import $ from 'jquery';
import whatInput from 'what-input';

window.$ = $;

//import Foundation from 'foundation-sites';
// If you want to pick and choose which modules to include, comment out the above and uncomment
// the line below
import './lib/foundation-explicit-pieces';

import libs from './lib/dependencies';

window.libs = libs;

$(document).foundation();
 
and I run into this issue
jQuery is missing, load it please
 
Why is it happening? What's wrong? Is there any tutorial how to do that?
 

Posts Followed






  • 14
    Replies
  • Foundation 6.4.1 - Add JS files

    By Martin

    js6.4.1

    Hi all,  Ive installed a clean version of 6.4.1 through the CLI. On previous versions I would add a js file into the js folder and it would be compiled into app.js file, just as the foundation docs outline.   I'm unfamiliar with webpack, but ... (continued)

    Last Reply by Jacky888 about 2 months ago





Following

    No Content

Followers

My Posts

My Comments

You commented on Frank Wronson's post 3 months

Is tjhere  a way how to check if plugins is initialized? 
I have the same problem with 
$(window).on('load', function(){
Foundation.reInit('equalizer');
});
as on same pages there is no equalizer and I get error 
We're sorry, '_init' is not an available method for this element.

You commented on Martin's post about 1 year

this is how our app.js looks like
import $ from 'jquery';
import whatInput from 'what-input';

window.$ = $;
window.jQuery = $;

//import Foundation from 'foundation-sites';
// If you want to pick and choose which modules to include, comment out the above and uncomment
// the line below
import './lib/foundation-explicit-pieces';

//import libs from './lib/dependencies';

//window.libs = libs;

var Nette = window.Nette = require('nette-forms');
Nette.initOnLoad();
require('nette.ajax.js');
require('owl.carousel');

$(document).foundation();

You commented on Arshavski Alexander's post over 1 year

Is there a way to do the opposite? To have all accordions on load?

You commented on Martin's post over 1 year

we run into other issues and I can't find anything on that topic in the forum or in the documentation.
 
I installed two nonmodular scripts. nette.ajax.js and nette-forms
 
Their paths are 
 
node_moudles/nette.ajax.js/nette.ajax.js
 
and when I require it  require('nette.ajax.js'); It works
 
but for nette-forms with the path node_modules/nette-forms/src/assets/netteForms.js
require('nette-forms'); doesn't work.
 
When copying the file to js folder and require it require('./netteForms.js'); It works.
 
 
But I run into issues with a non-defined variable which is defined in one of the files. I assume webpack load them asynchronously so the variable is not defined.
 
Another question is.. when I add the paths to config.yml like this:
 

  # Paths to JavaScript entry points for webpack to bundle modules
  entries:
    - "node_modules/nette.ajax.js/nette.ajax.js"
    - "node_modules/nette-forms/src/assets/netteForms.js"
    - "src/assets/js/app.js"

 
It generates 3 files. Should I have all the scripts in one generated files? Or it's meant to load all the files separately? If so, do I have to load jquery again? As it a part of app.js file.

You commented on Petr Ogurcak's post over 1 year
You commented on Matthew Andrianakos's post over 1 year

I run into the same issues is there any documentation how javascripts and jquery should be added into foundation 6.4?

You commented on Tony Tyson's post over 1 year

@Rafi, I run into some issues with the instructions there http://foundation.zurb.com/forum/posts/53526#comment_39031 Please can you have a look? Are you going to write some documentation how to install javascripts plugin via npm / yarn and webpack ?

You commented on Martin's post over 1 year

I have the same issue.. 
- I installed for example nette.ajax.js via yarn
- added it to config.yml
entries:
- "node_modules/nette.ajax.js/nette.ajax.js"
- created assets/js/lib/dependencies.js
// custom dependencies
import nette_ajax from 'nette.ajax.js';

const deps = {

nette_ajax: nette_ajax

};

module.exports = deps;
 
- added this piece of code to app.js
import $ from 'jquery';
import whatInput from 'what-input';

window.$ = $;

//import Foundation from 'foundation-sites';
// If you want to pick and choose which modules to include, comment out the above and uncomment
// the line below
import './lib/foundation-explicit-pieces';

import libs from './lib/dependencies';

window.libs = libs;

$(document).foundation();
 
and I run into this issue
jQuery is missing, load it please
 
Why is it happening? What's wrong? Is there any tutorial how to do that?

You commented on Martin's post over 1 year

I have the same issue.. 
- I installed for example nette.ajax.js via yarn
- added it to config.yml
entries:
- "node_modules/nette.ajax.js/nette.ajax.js"
- created assets/js/lib/dependencies.js
// custom dependencies
import nette_ajax from 'nette.ajax.js';

const deps = {

nette_ajax: nette_ajax

};

module.exports = deps;
 
- added this piece of code to app.js
import $ from 'jquery';
import whatInput from 'what-input';

window.$ = $;

//import Foundation from 'foundation-sites';
// If you want to pick and choose which modules to include, comment out the above and uncomment
// the line below
import './lib/foundation-explicit-pieces';

import libs from './lib/dependencies';

window.libs = libs;

$(document).foundation();
 
and I run into this issue
jQuery is missing, load it please
 
Why is it happening? What's wrong? Is there any tutorial how to do that?
 

Posts Followed

Following

  • No Content

Followers

  • No Content