I do not know how to look for this, so I ask here.
I am trying to figure out how this code works:
if ($("#main .oc .dc .image").removeAttr("style"), 1120 > wW && wW > 920)
$("#main .oc .dc .image").css({
width: Math.round(.3 * wW) + "px",
left: "calc(50% - " + Math.round(.3 * wW / 4) + "px)"
});
My questions -
What does the comma between .removeAttr("style")and 1120 > wWin the condition of this statement?
And how exactly the action is performed -
$("#main .oc .dc .image").css(
before curly braces and no quotes in css properties -
{width:Math.round(.3*wW)+"px",left:"calc(50% - "+Math.round(.3*wW/4)+"px)"}
bothers me.
source
share