1
I have a menu with several Ivs in it with content, this site I am developing the client will have access to edit and delete elements you want from the site, so these items from within the menu need to always be in the middle, however I am not able to make jQuery manage it, for example, if there is a div only the css class should change, if there are 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, I did something wrong?