How do i set the left position of an element that contains a before attribute?
I've tried both the following methods with no success:
$(".tooltip:before").css({left: 80});
$(".tooltip::before").css({left: 80});
here's the css if it helps
.tooltip {
background-color:#333;
display: block; position: absolute; z-index: 999999; padding: 5px 10px;
color: #fff;
}
// create the tip of the tooltip
.tooltip:before {
border: solid; border-color: #333 transparent; border-width: 6px 6px 0 6px;
position: absolute; bottom: -6px;
z-index: 9999999;
content: "";
left: 0; /* use jQuery to center the tip depending on the size of the tooltip */
}