i'm trying to set width to my div boxes, but it doesn't work here is my code:
var aMenu = [
{
width: x=650,
title: "Home",
contentid: "dvHome",
items: [{ image: '../Images/1-1.PNG' },
{ image: '../Images/1-2.PNG' },
{ image: '../Images/1-3.PNG' },
{ image: '../Images/1-4.PNG' },
{ image: '../Images/1-5.PNG' }]
},
{
title: "",
contentid: "dvArrow1",
items: [{ image: '../Icons/arrowLeft.png' },
{ image: '../Icons/arrowRight.png' }]
},
{
width: x = 550,
title: "Download",
contentid: "dvDownload",
items: [{ image: '../Images/2-1.PNG' },
{ image: '../Images/2-2.PNG' },
{ image: '../Images/2-3.PNG' },
{ image: '../Images/2-4.PNG' }]
},
{
title: "",
contentid: "dvArrow2",
items: [{ image: '../Icons/arrowLeft.png' },
{ image: '../Icons/arrowRight.png' }]
},
{
width: x=450,
title: "Support",
contentid: "dvSupport" ,
items: [{ image: '../Images/3-1.PNG' },
{ image: '../Images/3-2.PNG' },
{ image: '../Images/3-3.PNG' },
{ image: '../Images/3-4.PNG' }]
}
]
for (i = 0; i < aMenu.length; i++) {
$("#" + aMenu[i].contentid).append("<div "+ aMenu[i].width +"><a href='#'><h3>" + aMenu[i].title + "</h3></a></div>");
for (var j = 0; j < aMenu[i].items.length; j++) {
$("#" + aMenu[i].contentid).append("<a href='#'><img src=" + aMenu[i].items[j].image + " /> </a> ");
}
}