Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #37683 > unrolled thread
| Started by | coutinho.elias@gmail.com |
|---|---|
| First post | 2019-11-03 06:43 -0800 |
| Last post | 2019-11-03 06:43 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.javascript
Select materialize. coutinho.elias@gmail.com - 2019-11-03 06:43 -0800
| From | coutinho.elias@gmail.com |
|---|---|
| Date | 2019-11-03 06:43 -0800 |
| Subject | Select materialize. |
| Message-ID | <82d2014b-d33e-4a97-a7fe-a04ee63bdc3c@googlegroups.com> |
Good morning my friends,
I have the following code that I took from an example on the internet:
https://gsm-gervas.s3.amazonaws.com/static/js/jquery.formset_material.js
It is working perfectly but as the creator did not anticipate I am using materialize and when I create a new form (Function of the code) it does not take the js call of the function that is:
$ ('select'). material_select ();
That is, without the above call my selects do not work, tried to include but did not find suitable place for it.
I wonder if any friends can help me
I have two calling options:
document.addEventListener ('DOMContentLoaded', function () {
var elems = document.querySelectorAll ('select');
var instances = M.FormSelect.init (elems, options);
});
// Or with jQuery
$ (document) .ready (function () {
$ ('select'). formSelect ();
});
Back to top | Article view | comp.lang.javascript
csiph-web