Append jQuery var from outside the function

I have a jQuery function that is run from a WordPress parent, admin-theme. It looks like this:

jQuery(document).ready(function(){  
    var DIV_SIZE = [
        ['1/4','element1-4',1/4,['Column','Gallery','Content','Page']],
        ['1/3','element1-4',1/4,['Column','Gallery','Content','Page']],
    ];
}

I need to add an additional value: ,'blog' like so but do it from the functions.php file in my child theme:

Read More
jQuery(document).ready(function(){  
    var DIV_SIZE = [
        ['1/4','element1-4',1/4,['Column','Gallery','Content','Page','blog']],
        ['1/4','element1-4',1/4,['Column','Gallery','Content','Page','blog']],
    ];
}

How can I append DIV_SIZE?

Related posts

Leave a Reply

1 comment

  1. This js snippet will add ‘blog’ entry to each DIV_SIZE embeded array:

    for (var i = 0, z = DIV_SIZE.length; i < z; i++) {      
        DIV_SIZE[i][3].push('blog');
    }
    

    But still i don’t understand why you don’t just add it if its a static value directly when assigning DIV_SIZE variable.