adding DOM elements and accessing a selector..

adding DOM elements and accessing a selector..

I return json string and loop through the results putting items in Div's and want can't seem to access the class attribute / selector.
 
  1.             $.getJSON(strUrl, function (data) {

                    var items = [];

                    $.each(data.Division, function (i, div) {/*--- Keep DOM manipulation to minimum. ---*/

                        if (div.divCode != "") items

                            .push(

                                "<div id='divOuter" + div.divCode + "' class='BoxOuterDiv' >"

                                + "<div id='div" + div.divCode + "' class='BoxDiv' >"

                                + "--" + div.divCode + "-" + div.divDesc

                                + "</div>"

                                );

                        $.each(data.MajorFunction, function (x, mf) {/*--- Keep DOM manipulation to minimum. ---*/

                            if (div.divCode == mf.divCode) items

                                .push(

                                    "<div id='div" + mf.divCode + mf.mfCode + "' class='BoxMF' >"

                                      + "---" + mf.mfCode + "-" + mf.mfDesc

                                      + "</div>"

                                    );

                            $.each(data.Department, function (j, dept) {/*--- Keep DOM manipulation to minimum. ---*/

                                if (mf.divCode == dept.divCode && mf.mfCode == dept.mfCode) items

                                    .push(

                                        "<div id='div" + dept.divCode + dept.mfCode + dept.deptCode + "' class='BoxDept' >"

                                          + "----" + dept.deptCode + "-" + dept.deptDesc

                                          + "</div>"

                                        );

                            });

                        });

                    });

     

                    $('body').append(items.join(''));

                });