I'm trying to change the style of the very first step (data-step="1"
) and I went about it by calling onbeforechange()
introJs().onbeforechange(function(targetElement) {
switch (targetElement.getAttribute("data-step"))
{
case "1":
//change CSS styling only for the first box
$(".introjs-helperLayer .introjs-tooltip").attr("style", "margin-left: 10%");
break;
}
}).start();
Essentially, I'm trying to center the tooltip for the very first step. Any help is much appreciated; I'm a near-novice in JavaScript.