Wendy
0
Q:

jquery add element to array

var fruits = ["222", "vvvv", "eee", "eeee"];

fruits.push("Kiwi"); 
11
var fruits = ["Banana", "Orange", "Apple", "Mango"];

fruits.push("Kiwi"); 
0

var fruits = ["Banana", "Orange", "Apple", "Mango"];

fruits.push("Kiwi"); 
0
var ids = [];

    $(document).ready(function($) {
    var $div = $("<div id='hexCodes'></div>").appendTo(document.body), code;
    $(".color_cell").each(function() {
        code = $(this).attr('id');
        ids.push(code);
        $div.append(code + "<br />");
    });



});
0

New to Communities?

Join the community