I have a menu with several divs in it with content, this site I'm developing the client will have access to edit and delete elements you want from the site, so these items from the menu must always be in the middle, but I can not do the jQuery manage this, eg if there is a div only the css class should change, if it is two, it should be other properties, follow my current code:
var numCells = $("div.secondMenuButtonsCell").length;
alert(numCells);
if(numCells == 1){
$(".secondMenuButtonsCell").css({
"width": "50% !important",
"margin-right": "auto !important",
"margin-left": "auto !important"
"border-right":"1px solid #CCCCCC !important",
"height": "71px !important",
"padding": "14px !important",
"display": "inline-grid !important"
});
$("a.btnContentRow").css({
"display": "inline-block !important",
"text-align": "left !important"
}); };
But this code is not changing the class, did I do something wrong?