I have this code that works good. I tested at my localhost and my server. I add this code into my Laravel project. but somehow this generateFields doesn't show up. I use excatly same js and css CDN. and I checked the .js file included at html sorce code. Could someone teach me what might be cause please?
Whole code
https://jsfiddle.net/blueink/ec15ytmq/20/
This container doesn't show up.
index.html
<div id="container">
</div>
app.js
generateFields: (fieldNumber) => {
Array(fieldNumber).fill().map((v, i) => {
const ref = i + 1;
$('#container').append(
`<div class="fieldContainer">
<div class="btn-group">
<input type="text" class="search" data-ref="${ref}" placeholder="type something" class="form-control" onkeypress="return event.keyCode!=13" />
<span class="search-clear glyphicon glyphicon-remove-circle" data-ref="${ref}"></span>
</div>
<ul class="list-group resultUl" data-ref="${ref}"></ul>
</div>`
)
});
},
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire