data insertion in 2D array in jquery -
i want insert data in array through jquery below:
means @ first time insert values on first position , second time insert values on second postion (i.e not insert values @ time on both positions)
var custarr = new array(); custarr.push(["structure", "select parent"]); custarr.push(["a", ""]); custarr.push(["b", ""]); var sel = $('<select>').appendto('body'); (var = 0; < custarr.length; i++) { custarr.push("", sel.append($("<option>").attr('value', "some values"); }
expected result is:
custarr.push(["structure", sel.append($("<option>").attr('value', "some values")]);
i cannot insert them both problem firstly in first loop. can insert structure values , in second loop need insert dropdown in front of structure values.
Comments
Post a Comment