onlycode.org

javascript
jquery
html
angularjs
css
node.js
ajax
html5
php
json
arrays
google-chrome
dom
regex
reactjs
ecmascript-6
javascript-events

your's history:
splice data in array...

Splice data in array, just only code

javascript | jquery

edit
var choiceFields = [];
$('#selectFields').multipleSelect({
  filter: true,
  onClick: function(view) {
    choiceFields.push(view.value);
    var length = choiceFields.length - 1;
    if (view.checked === false) {
      choiceFields = jQuery.grep(choiceFields, function(value) {
        return value != view.value;
      });
    }
    console.log(choiceFields);
  }
});
choiceFields.splice(view.value);
choiceFields = jQuery.grep(choiceFields, function(value) {
  return value != view.value;
});

26
Carsten Løvbo Andersen, 15.10.2018 09:15

Add your just only code

your name:    



If you need full text click here

Some similar links Splice data in array ↓:
Delete vs splice on associative array

Remove items from array with splice in for loop

Deleting array elements in JavaScript - delete vs splice

A better way to splice an array into an array in javascript



This project is created for those who just need only code, wihout maaaaaaaaaaany words.