diff --git a/js/hopscotch-min.js b/js/hopscotch-min.js index 738c3715..f6218b6f 100644 --- a/js/hopscotch-min.js +++ b/js/hopscotch-min.js @@ -1 +1 @@ -(function(c,d){var n,f,k,j,h,a,m=c[d],i="undefined",b=false,l=(typeof window.sessionStorage!==i),g=document.body.style,e=(typeof g.MozTransition!==i||typeof g.MsTransition!==i||typeof g.webkitTransition!==i||typeof g.OTransition!==i||typeof g.transition!==i);if(m){return}a=function(){docLoaded=true;if(b){m.startTour()}};if(window.addEventListener){window.addEventListener("load",a)}else{if(window.attachEvent){window.attachEvent("onload",a)}}j={addClass:function(q,s){var p,r,o;if(q.className.length===0){q.className=s}else{p=q.className.split(" ");for(r=0,o=p.length;r=0){j.addClass(u,"prev")}else{j.addClass(u,"next")}return u},q=function(v,u,x){var w="hide";if(x){w="hide-all"}if(typeof u===i){u=true}if(u){j.removeClass(v,w)}else{j.addClass(v,w)}},r=function(B,x,I){var E,u,C,w,z,A,D,y,H=j.getStepTarget(x),v=B.element,G=B.arrowEl,F=j.getPixelValue(x.arrowOffset);I=j.valOrDefault(I,true);E=j.getPixelValue(x.width)||t.bubbleWidth;C=j.valOrDefault(x.padding,t.bubblePadding);bubbleBorder=j.valOrDefault(x.padding,t.bubbleBorder);j.removeClass(v,"bounce-down bounce-up bounce-left bounce-right");w=H.getBoundingClientRect();if(x.orientation==="top"){u=v.offsetHeight;D=(w.top-u)-t.arrowWidth;y=w.left;A="bounce-down"}else{if(x.orientation==="bottom"){D=w.bottom+t.arrowWidth;y=w.left;A="bounce-up"}else{if(x.orientation==="left"){D=w.top;y=w.left-E-2*C-2*bubbleBorder-t.arrowWidth;A="bounce-right"}else{if(x.orientation==="right"){D=w.top;y=w.right+t.arrowWidth;A="bounce-left"}}}}if(!F){G.style.top="";G.style.left=""}else{if(x.orientation==="top"||x.orientation==="bottom"){G.style.left=F+"px"}else{if(x.orientation==="left"||x.orientation==="right"){G.style.top=F+"px"}}}y+=j.getPixelValue(x.xOffset);D+=j.getPixelValue(x.yOffset);D+=j.getScrollTop();y+=j.getScrollLeft();if(t.animate){v.style.top=D+"px";v.style.left=y+"px"}else{v.style.top=D+"px";v.style.left=y+"px";if(I){z=t.smoothScroll?t.scrollDuration:0;setTimeout(function(){j.addClass(v,A)},z);setTimeout(function(){j.removeClass(v,A)},z+2000)}}};this.init=function(){var y=document.createElement("div"),z=document.createElement("div"),x=document.createElement("div"),w=this,A=false,v,u;this.element=y;this.containerEl=z;this.titleEl=document.createElement("h3");this.numberEl=document.createElement("span");this.contentEl=document.createElement("p");y.id="hopscotch-bubble";j.addClass(y,"animated");z.id="hopscotch-bubble-container";this.numberEl.id="hopscotch-bubble-number";z.appendChild(this.numberEl);x.appendChild(this.titleEl);x.appendChild(this.contentEl);x.id="hopscotch-bubble-content";z.appendChild(x);y.appendChild(z);this.initNavButtons();this.initCloseButton();this.initArrow();v=function(){if(A||!p){return}A=true;u=setTimeout(function(){r(w,o,false);A=false},200)};if(window.addEventListener){window.addEventListener("resize",v)}else{if(window.attachEvent){window.attachEvent("onresize",v)}}this.hide();document.body.appendChild(y);return this};this.initNavButtons=function(){var u=document.createElement("div");this.prevBtnEl=s("hopscotch-prev",k.prevBtn);this.nextBtnEl=s("hopscotch-next",k.nextBtn);this.doneBtnEl=s("hopscotch-done",k.doneBtn);j.addClass(this.doneBtnEl,"hide");u.appendChild(this.prevBtnEl);u.appendChild(this.nextBtnEl);u.appendChild(this.doneBtnEl);j.addClickListener(this.prevBtnEl,function(v){m.prevStep()});j.addClickListener(this.nextBtnEl,function(v){m.nextStep()});j.addClickListener(this.doneBtnEl,m.endTour);u.id="hopscotch-actions";this.buttonsEl=u;this.containerEl.appendChild(u);return this};this.initCloseButton=function(){var u=document.createElement("a");u.id="hopscotch-bubble-close";u.href="#";u.title=k.closeTooltip;u.innerHTML=k.closeTooltip;j.addClickListener(u,function(w){var v=hopscotch.getCurrStepNum(),x=hopscotch.getCurrTour(),y=(v===x.steps.length-1);j.invokeCallbacks("close",[x.id,v]);m.endTour(true,y);if(w.preventDefault){w.preventDefault()}else{if(event){event.returnValue=false}}});this.closeBtnEl=u;this.containerEl.appendChild(u);return this};this.initArrow=function(){var u,v;this.arrowEl=document.createElement("div");this.arrowEl.id="hopscotch-bubble-arrow-container";v=document.createElement("div");v.className="hopscotch-bubble-arrow-border";u=document.createElement("div");u.className="hopscotch-bubble-arrow";this.arrowEl.appendChild(v);this.arrowEl.appendChild(u);this.element.appendChild(this.arrowEl);return this};this.renderStep=function(w,B,x,y,C){var D=this,v=j.valOrDefault(w.showNextButton,t.showNextButton),u=j.valOrDefault(w.showPrevButton,t.showPrevButton),A,z;o=w;this.setTitle(w.title?w.title:"");this.setContent(w.content?w.content:"");this.setNum(B);this.showPrevButton(this.prevBtnEl&&u&&(B>0||x>0));this.showNextButton(this.nextBtnEl&&v&&!y);this.nextBtnEl.value=w.showSkip?k.skipBtn:k.nextBtn;if(w.showSkip){}if(y){j.removeClass(this.doneBtnEl,"hide")}else{j.addClass(this.doneBtnEl,"hide")}this.setArrow(w.orientation);A=j.getPixelValue(w.width)||t.bubbleWidth;z=j.valOrDefault(w.padding,t.bubblePadding);this.containerEl.style.width=A+"px";this.containerEl.style.padding=z+"px";if(w.orientation==="top"){setTimeout(function(){r(D,w);if(C){C()}},5)}else{r(this,w);if(C){C()}}return this};this.setTitle=function(u){if(u){this.titleEl.innerHTML=u;j.removeClass(this.titleEl,"hide")}else{j.addClass(this.titleEl,"hide")}return this};this.setContent=function(u){if(u){this.contentEl.innerHTML=u;j.removeClass(this.contentEl,"hide")}else{j.addClass(this.contentEl,"hide")}return this};this.setNum=function(u){if(k.stepNums&&u0)?E[A]:E},B=function(){var E=v.steps[q].length;if(A0){--A;return true}else{if(q>0){E=v.steps[--q].length;if(E){A=E-1}else{A=undefined}return true}}return false},o=function(){return v.steps[q].length>0},x=function(){var U=t().element,Q=j.getPixelValue(U.style.top),P=Q+j.getPixelValue(U.offsetHeight),N=j.getStepTarget(C()),V=N.getBoundingClientRect(),S=V.top+j.getScrollTop(),O=V.bottom+j.getScrollTop(),L=(QO)?P:O,R=j.getScrollTop(),G=R+j.getWindowHeight(),H=L-r.scrollTopMargin,F,K,J,T,I,M;if(typeof YAHOO!==i&&typeof YAHOO.env!==i&&typeof YAHOO.env.ua!==i&&typeof YAHOO.util!==i&&typeof YAHOO.util.Scroll!==i){F=YAHOO.env.ua.webkit?document.body:document.documentElement;J=YAHOO.util.Easing?YAHOO.util.Easing.easeOut:undefined;K=new YAHOO.util.Scroll(F,{scroll:{to:[0,H]}},r.scrollDuration/1000,J);K.animate();return}if(H<0){H=0}if(L>=R&&L<=R+r.scrollTopMargin){return}if(LG){if(r.smoothScroll){T=(R>L)?-1:1;I=Math.abs(R-H)/(r.scrollDuration/10);M=setInterval(function(){var X=j.getScrollTop(),W=X+(T*I);if((T>0&&W>=H)||T<0&&W<=H){W=H;clearInterval(M)}window.scrollTo(0,W);if(j.getScrollTop()===X){clearInterval(M)}},10)}else{window.scrollTo(0,H)}}};this.init=function(){if(p){this.configure(p)}return this};this.loadTour=function(J){var H={},F,K,G,E,I;v=J;for(K in J){if(J.hasOwnProperty(K)&&K!=="id"&&K!=="steps"){H[K]=J[K]}}this.resetDefaultOptions();s.call(this,H,true);E=j.getState(r.cookieName);if(E){I=E.split(":");D=I[0];u=I[1];w=undefined;G=u.split("-");if(G.length>1){u=parseInt(G[0],10);w=parseInt(G[1],10)}else{u=parseInt(u,10)}if(I.length>2&&I[2]==="mp"){if(w&&w0){w=0}else{w=undefined}}}}}F=t();F.showPrevButton(r.showPrevButton,true);F.showNextButton(r.showNextButton,true);return this};this.startTour=function(H,G){var E,F;if(!v){throw"Need to load a tour before you start it!"}if(document.readyState!=="complete"){b=true;return}if(typeof H!==i){q=H;A=G}else{if(v.id===D&&typeof u!==i){q=u;A=w;F=C();if(!j.getStepTarget(F)){y();F=C();if(!j.getStepTarget(F)){this.endTour(false);return}}}else{q=0}}if(!A&&o()){A=0}if(q===0&&!A){j.invokeCallbacks("start",[v.id])}this.showStep(q,A);E=t().show();if(r.animate){E.initAnimate()}this.isActive=true;return this};this.showStep=function(I,G){var L=v.steps,J=L[I],H=L.length,F=v.id+":"+I,E=t(),K;q=I;A=G;if(typeof G!==i&&o()){J=J[G];F+="-"+G}K=(I===H-1)||(G>=J.length-1);E.renderStep(J,I,G,K,x);if(J.multipage){F+=":mp"}j.setState(r.cookieName,F,1);return this};this.prevStep=function(){var F=C(),E=false;j.invokeCallbacks("prev",[v.id,q]);if(F.onPrev){F.onPrev()}if(r.skipIfNoElement){while(!E&&y()){F=C();E=j.getStepTarget(F)}if(!E){this.endTour()}}else{if(y()){F=C();if(!j.getStepTarget(F)){j.invokeCallbacks("error",[v.id,q]);return}}}this.showStep(q,A);return this};this.nextStep=function(){var F=C(),E=false;j.invokeCallbacks("next",[v.id,q]);if(F.onNext){F.onNext()}if(r.skipIfNoElement){while(!E&&B()){F=C();E=j.getStepTarget(F)}if(!E){this.endTour()}}else{if(B()){F=C();if(!j.getStepTarget(F)){j.invokeCallbacks("error",[v.id,q]);this.endTour();return}}}this.showStep(q,A);return this};this.endTour=function(G,F){var E=t();G=j.valOrDefault(G,true);F=j.valOrDefault(F,true);q=0;A=undefined;u=undefined;E.hide();if(G){j.clearState(r.cookieName)}m.isActive=false;if(F){j.invokeCallbacks("end",[v.id])}hopscotch.removeCallbacks(true);return this};this.getCurrTour=function(){return v};this.getCurrStepNum=function(){return q};this.getCurrSubstepNum=function(){return A};this.addCallback=function(G,E,F){if(E){h[G].push({cb:E,fromTour:F})}return this};this.removeCallbacks=function(F){var I,G,E,H;for(H in h){if(F){I=h[H];for(G=0,E=I.length;G=0){i.addClass(t,"prev")}else{i.addClass(t,"next")}return t},p=function(u,t,w){var v="hide";if(w){v="hide-all"}if(typeof t===h){t=true}if(t){i.removeClass(u,v)}else{i.addClass(u,v)}},q=function(B,w,I){var E,t,C,v,z,A,D,x,y=6,H=i.getStepTarget(w),u=B.element,G=B.arrowEl,F=i.getPixelValue(w.arrowOffset);I=i.valOrDefault(I,true);E=i.getPixelValue(w.width)||s.bubbleWidth;C=i.valOrDefault(w.padding,s.bubblePadding);i.removeClass(u,"bounce-down bounce-up bounce-left bounce-right");v=H.getBoundingClientRect();if(w.orientation==="top"){t=u.offsetHeight;D=(v.top-t)-s.arrowWidth;x=v.left;A="bounce-down"}else{if(w.orientation==="bottom"){D=v.bottom+s.arrowWidth;x=v.left;A="bounce-up"}else{if(w.orientation==="left"){D=v.top;x=v.left-E-2*C-2*y-s.arrowWidth;A="bounce-right"}else{if(w.orientation==="right"){D=v.top;x=v.right+s.arrowWidth;A="bounce-left"}}}}if(!F){G.style.top="";G.style.left=""}else{if(w.orientation==="top"||w.orientation==="bottom"){G.style.left=F+"px"}else{if(w.orientation==="left"||w.orientation==="right"){G.style.top=F+"px"}}}x+=i.getPixelValue(w.xOffset);D+=i.getPixelValue(w.yOffset);D+=i.getScrollTop();x+=i.getScrollLeft();if(s.animate){u.style.top=D+"px";u.style.left=x+"px"}else{u.style.top=D+"px";u.style.left=x+"px";if(I){z=s.smoothScroll?s.scrollDuration:0;setTimeout(function(){i.addClass(u,A)},z);setTimeout(function(){i.removeClass(u,A)},z+2000)}}};this.init=function(){var x=document.createElement("div"),y=document.createElement("div"),w=document.createElement("div"),v=this,z=false,u,t;this.element=x;this.containerEl=y;this.titleEl=document.createElement("h3");this.numberEl=document.createElement("span");this.contentEl=document.createElement("p");x.id="hopscotch-bubble";i.addClass(x,"animated");y.id="hopscotch-bubble-container";this.numberEl.id="hopscotch-bubble-number";y.appendChild(this.numberEl);w.appendChild(this.titleEl);w.appendChild(this.contentEl);w.id="hopscotch-bubble-content";y.appendChild(w);x.appendChild(y);this.initNavButtons();this.initCloseButton();this.initArrow();u=function(){if(z||!o){return}z=true;t=setTimeout(function(){q(v,n,false);z=false},200)};if(window.addEventListener){window.addEventListener("resize",u)}else{if(window.attachEvent){window.attachEvent("onresize",u)}}this.hide();document.body.appendChild(x);return this};this.initNavButtons=function(){var t=document.createElement("div");this.prevBtnEl=r("hopscotch-prev",j.prevBtn);this.nextBtnEl=r("hopscotch-next",j.nextBtn);this.doneBtnEl=r("hopscotch-done",j.doneBtn);i.addClass(this.doneBtnEl,"hide");t.appendChild(this.prevBtnEl);t.appendChild(this.nextBtnEl);t.appendChild(this.doneBtnEl);i.addClickListener(this.prevBtnEl,function(u){l.prevStep()});i.addClickListener(this.nextBtnEl,function(u){l.nextStep()});i.addClickListener(this.doneBtnEl,l.endTour);t.id="hopscotch-actions";this.buttonsEl=t;this.containerEl.appendChild(t);return this};this.initCloseButton=function(){var t=document.createElement("a");t.id="hopscotch-bubble-close";t.href="#";t.title=j.closeTooltip;t.innerHTML=j.closeTooltip;i.addClickListener(t,function(v){var u=l.getCurrStepNum(),w=l.getCurrTour(),x=(u===w.steps.length-1);i.invokeCallbacks("close",[w.id,u]);l.endTour(true,x);if(v.preventDefault){v.preventDefault()}else{if(event){event.returnValue=false}}});this.closeBtnEl=t;this.containerEl.appendChild(t);return this};this.initArrow=function(){var t,u;this.arrowEl=document.createElement("div");this.arrowEl.id="hopscotch-bubble-arrow-container";u=document.createElement("div");u.className="hopscotch-bubble-arrow-border";t=document.createElement("div");t.className="hopscotch-bubble-arrow";this.arrowEl.appendChild(u);this.arrowEl.appendChild(t);this.element.appendChild(this.arrowEl);return this};this.renderStep=function(v,A,w,x,B){var C=this,u=i.valOrDefault(v.showNextButton,s.showNextButton),t=i.valOrDefault(v.showPrevButton,s.showPrevButton),z,y;n=v;this.setTitle(v.title?v.title:"");this.setContent(v.content?v.content:"");this.setNum(A);this.showPrevButton(this.prevBtnEl&&t&&(A>0||w>0));this.showNextButton(this.nextBtnEl&&u&&!x);this.nextBtnEl.value=v.showSkip?j.skipBtn:j.nextBtn;if(x){i.removeClass(this.doneBtnEl,"hide")}else{i.addClass(this.doneBtnEl,"hide")}this.setArrow(v.orientation);z=i.getPixelValue(v.width)||s.bubbleWidth;y=i.valOrDefault(v.padding,s.bubblePadding);this.containerEl.style.width=z+"px";this.containerEl.style.padding=y+"px";if(v.orientation==="top"){setTimeout(function(){q(C,v);if(B){B()}},5)}else{q(this,v);if(B){B()}}return this};this.setTitle=function(t){if(t){this.titleEl.innerHTML=t;i.removeClass(this.titleEl,"hide")}else{i.addClass(this.titleEl,"hide")}return this};this.setContent=function(t){if(t){this.contentEl.innerHTML=t;i.removeClass(this.contentEl,"hide")}else{i.addClass(this.contentEl,"hide")}return this};this.setNum=function(t){if(j.stepNums&&t0)?E[z]:E},n=function(){return u.steps[p].length>0},A=function(){var E=u.steps[p].length;if(z0){--z;return true}else{if(p>0){E=u.steps[--p].length;if(E){z=E-1}else{z=undefined}return true}}return false},w=function(){var U=s().element,Q=i.getPixelValue(U.style.top),P=Q+i.getPixelValue(U.offsetHeight),N=i.getStepTarget(B()),V=N.getBoundingClientRect(),S=V.top+i.getScrollTop(),O=V.bottom+i.getScrollTop(),L=(QO)?P:O,R=i.getScrollTop(),G=R+i.getWindowHeight(),H=L-q.scrollTopMargin,F,K,J,T,I,M;if(typeof YAHOO!==h&&typeof YAHOO.env!==h&&typeof YAHOO.env.ua!==h&&typeof YAHOO.util!==h&&typeof YAHOO.util.Scroll!==h){F=YAHOO.env.ua.webkit?document.body:document.documentElement;J=YAHOO.util.Easing?YAHOO.util.Easing.easeOut:undefined;K=new YAHOO.util.Scroll(F,{scroll:{to:[0,H]}},q.scrollDuration/1000,J);K.animate();return}if(H<0){H=0}if(L>=R&&L<=R+q.scrollTopMargin){return}if(LG){if(q.smoothScroll){T=(R>L)?-1:1;I=Math.abs(R-H)/(q.scrollDuration/10);M=setInterval(function(){var X=i.getScrollTop(),W=X+(T*I);if((T>0&&W>=H)||T<0&&W<=H){W=H;clearInterval(M)}window.scrollTo(0,W);if(i.getScrollTop()===X){clearInterval(M)}},10)}else{window.scrollTo(0,H)}}},D=function(){if(o){this.configure(o)}};this.loadTour=function(J){var H={},F,K,G,E,I;u=J;for(K in J){if(J.hasOwnProperty(K)&&K!=="id"&&K!=="steps"){H[K]=J[K]}}this.resetDefaultOptions();r.call(this,H,true);E=i.getState(q.cookieName);if(E){I=E.split(":");C=I[0];t=I[1];v=undefined;G=t.split("-");if(G.length>1){t=parseInt(G[0],10);v=parseInt(G[1],10)}else{t=parseInt(t,10)}if(I.length>2&&I[2]==="mp"){if(v&&v0){v=0}else{v=undefined}}}}}F=s();F.showPrevButton(q.showPrevButton,true);F.showNextButton(q.showNextButton,true);return this};this.startTour=function(H,G){var E,F;if(!u){throw"Need to load a tour before you start it!"}if(document.readyState!=="complete"){b=true;return}if(typeof H!==h){p=H;z=G}else{if(u.id===C&&typeof t!==h){p=t;z=v;F=B();if(!i.getStepTarget(F)){x();F=B();if(!i.getStepTarget(F)){this.endTour(false);return}}}else{p=0}}if(!z&&n()){z=0}if(p===0&&!z){i.invokeCallbacks("start",[u.id])}this.showStep(p,z);E=s().show();if(q.animate){E.initAnimate()}this.isActive=true;return this};this.showStep=function(I,G){var L=u.steps,J=L[I],H=L.length,F=u.id+":"+I,E=s(),K;p=I;z=G;if(typeof G!==h&&n()){J=J[G];F+="-"+G}K=(I===H-1)||(G>=J.length-1);E.renderStep(J,I,G,K,w);if(J.multipage){F+=":mp"}i.setState(q.cookieName,F,1);return this};this.prevStep=function(){var F=B(),E=false;i.invokeCallbacks("prev",[u.id,p]);if(F.onPrev){F.onPrev()}if(q.skipIfNoElement){while(!E&&x()){F=B();E=i.getStepTarget(F);if(!E){i.invokeCallbacks("error",[u.id,p])}}if(!E){return this.endTour(true,false)}}else{if(x()){F=B();if(!i.getStepTarget(F)){i.invokeCallbacks("error",[u.id,p]);return this.endTour(true,false)}}}this.showStep(p,z);return this};this.nextStep=function(){var F=B(),E=false;i.invokeCallbacks("next",[u.id,p]);if(F.onNext){F.onNext()}if(q.skipIfNoElement){while(!E&&A()){F=B();E=i.getStepTarget(F);if(!E){i.invokeCallbacks("error",[u.id,p])}}if(!E){return this.endTour(true,false)}}else{if(A()){F=B();if(!i.getStepTarget(F)){i.invokeCallbacks("error",[u.id,p]);return this.endTour(true,false)}}}this.showStep(p,z);return this};this.endTour=function(G,F){var E=s();G=i.valOrDefault(G,true);F=i.valOrDefault(F,true);p=0;z=undefined;t=undefined;E.hide();if(G){i.clearState(q.cookieName)}l.isActive=false;if(F){i.invokeCallbacks("end",[u.id])}l.removeCallbacks(true);return this};this.getCurrTour=function(){return u};this.getCurrStepNum=function(){return p};this.getCurrSubstepNum=function(){return z};this.addCallback=function(G,E,F){if(E){g[G].push({cb:E,fromTour:F})}return this};this.removeCallbacks=function(F){var I,G,E,H;for(H in g){if(F){I=g[H];for(G=0,E=I.length;G 0 || subIdx > 0)); this.showNextButton(this.nextBtnEl && showNext && !isLast); this.nextBtnEl.value = step.showSkip ? HopscotchI18N.skipBtn : HopscotchI18N.nextBtn; - if (step.showSkip) { - } if (isLast) { utils.removeClass(this.doneBtnEl, 'hide'); @@ -734,6 +726,10 @@ return (step.length > 0) ? step[currSubstepNum] : step; }, + isInMultiPartStep = function() { + return currTour.steps[currStepNum].length > 0; + }, + /** * incrementStep * ============= @@ -779,10 +775,6 @@ return false; }, - isInMultiPartStep = function() { - return currTour.steps[currStepNum].length > 0; - }, - /** * adjustWindowScroll * ================== @@ -864,13 +856,12 @@ window.scrollTo(0, scrollToVal); } } - }; + }, - this.init = function() { + init = function() { if (initOptions) { this.configure(initOptions); } - return this; }; /** @@ -1045,9 +1036,12 @@ while (!foundTarget && decrementStep()) { step = getCurrStep(); foundTarget = utils.getStepTarget(step); + if (!foundTarget) { + utils.invokeCallbacks('error', [currTour.id, currStepNum]); + } } if (!foundTarget) { - this.endTour(); + return this.endTour(true, false); } } @@ -1057,7 +1051,7 @@ step = getCurrStep(); if (!utils.getStepTarget(step)) { utils.invokeCallbacks('error', [currTour.id, currStepNum]); - return; + return this.endTour(true, false); } } @@ -1077,24 +1071,26 @@ } if (opt.skipIfNoElement) { - // decrement step until we find a target or until we reach beginning + // increment step until we find a target or until we reach beginning while (!foundTarget && incrementStep()) { step = getCurrStep(); foundTarget = utils.getStepTarget(step); + if (!foundTarget) { + utils.invokeCallbacks('error', [currTour.id, currStepNum]); + } } if (!foundTarget) { - this.endTour(); + return this.endTour(true, false); } } else if (incrementStep()) { - // only try decrementing once, and invoke error callback if no target + // only try incrementing once, and invoke error callback if no target // is found step = getCurrStep(); if (!utils.getStepTarget(step)) { utils.invokeCallbacks('error', [currTour.id, currStepNum]); - this.endTour(); - return; + return this.endTour(true, false); } } this.showStep(currStepNum, currSubstepNum); @@ -1125,7 +1121,7 @@ utils.invokeCallbacks('end', [currTour.id]); } - hopscotch.removeCallbacks(true); + winHopscotch.removeCallbacks(true); return this; }; @@ -1242,9 +1238,8 @@ showNextButton: true, bubbleWidth: 280, bubblePadding: 15, - bubbleBorder: 6, arrowWidth: 20, - skipIfNoElement: false, + skipIfNoElement: true, cookieName: 'hopscotch.tour.state' }; }; @@ -1255,7 +1250,6 @@ * VALID OPTIONS INCLUDE... * bubbleWidth: Number - Default bubble width. Defaults to 280. * bubblePadding: Number - Default bubble padding. Defaults to 15. - * bubbleBorder: Number - Default bubble border width. Defaults to 6. * animate: Boolean - should the tour bubble animate between steps? * Defaults to FALSE. * smoothScroll: Boolean - should the page scroll smoothly to the next @@ -1273,12 +1267,13 @@ * showNextButton: Boolean - should the bubble have the Next button? * Defaults to TRUE. * arrowWidth: Number - Default arrow width. (space between the bubble - * and the targetEl) Need to provide the option - * to set this here in case developer wants to - * use own CSS. Defaults to 28. + * and the targetEl) Used for bubble position + * calculation. Need to provide the option to set + * this here in case developer wants to use own CSS. + * Defaults to 20. * skipIfNoElement Boolean - If a specified target element is not found, * should we skip to the next step? Defaults to - * FALSE. + * TRUE. * onNext: Function - A callback to be invoked after every click on * a "Next" button. * @@ -1340,7 +1335,7 @@ return _configure.call(this, options, false); }; - this.init(initOptions); + init.call(this, initOptions); }; winHopscotch = new Hopscotch(); diff --git a/js/hopscotch_jquery-min.js b/js/hopscotch_jquery-min.js index 375e3e61..9aefd9a0 100644 --- a/js/hopscotch_jquery-min.js +++ b/js/hopscotch_jquery-min.js @@ -1 +1 @@ -(function(b,c){var m,e,j,i,g,h="undefined",l=b[c],a=false,k=(typeof window.sessionStorage!==h),f=document.body.style,d=(typeof f.MozTransition!==h||typeof f.MsTransition!==h||typeof f.webkitTransition!==h||typeof f.OTransition!==h||typeof f.transition!==h);if(l){return}$(window).load(function(){if(a){l.startTour()}});i={getPixelValue:function(o){var n=typeof o;if(n==="number"){return o}if(n==="string"){return parseInt(o,10)}return 0},valOrDefault:function(o,n){return typeof o!==h?o:n},invokeCallbacks:function(q,n){var p=g[q],o=0;len=p.length;for(;o");t.attr({id:v,type:"button",value:u});t.addClass("hopscotch-nav-button");if(v.indexOf("prev")>=0){t.addClass("prev")}else{t.addClass("next")}return t},p=function(u,t,w){var v=w?"hide-all":"hide";if(typeof t===h){t=true}if(t){u.removeClass(v)}else{u.addClass(v)}},q=function(A,v,H){var D,t,B,u,y,z,C,w,F=i.getStepTarget(v)[0],G=A.$element,x=A.$arrowEl,E=i.getPixelValue(v.arrowOffset);H=i.valOrDefault(H,true);D=i.getPixelValue(v.width)||s.bubbleWidth;B=i.valOrDefault(v.padding,s.bubblePadding);bubbleBorder=i.valOrDefault(v.padding,s.bubbleBorder);G.removeClass("bounce-down bounce-up bounce-left bounce-right");u=F.getBoundingClientRect();if(v.orientation==="top"){t=G.height();C=(u.top-t)-s.arrowWidth;w=u.left;z="bounce-down"}else{if(v.orientation==="bottom"){C=u.bottom+s.arrowWidth;w=u.left;z="bounce-up"}else{if(v.orientation==="left"){C=u.top;w=u.left-D-2*B-2*bubbleBorder-s.arrowWidth;z="bounce-right"}else{if(v.orientation==="right"){C=u.top;w=u.right+s.arrowWidth;z="bounce-left"}}}}if(!E){x.css({top:"",left:""})}else{if(v.orientation==="top"||v.orientation==="bottom"){x.css("left",E+"px")}else{if(v.orientation==="left"||v.orientation==="right"){x.css("top",E+"px")}}}w+=i.getPixelValue(v.xOffset);C+=i.getPixelValue(v.yOffset);C+=i.getScrollTop();w+=i.getScrollLeft();if(s.animate){if(!d&&s.animate){G.animate({top:C+"px",left:w+"px"})}else{G.css("top",C+"px");G.css("left",w+"px")}}else{G.css("top",C+"px");G.css("left",w+"px");if(H){y=s.smoothScroll?s.scrollDuration:0;setTimeout(function(){G.addClass(z)},y);setTimeout(function(){G.removeClass(z)},y+2000)}}};this.init=function(){var w=$("
"),u=$("
"),x=$("
"),v=this,y=false,t;this.$element=w;this.$containerEl=u;this.$titleEl=$("

");this.$numberEl=$("");this.$contentEl=$("

");this.$numberEl.attr("id","hopscotch-bubble-number");x.append(this.$titleEl,this.$contentEl).attr("id","hopscotch-bubble-content");u.attr("id","hopscotch-bubble-container").append(this.$numberEl,x);w.attr("id","hopscotch-bubble").addClass("animated").append(u);this.initNavButtons();this.initCloseButton();this.initArrow();$(window).on("resize",function(){if(y||!o){return}y=true;t=setTimeout(function(){q(v,n,false);y=false},200)});this.hide();$("body").append(w);return this};this.initNavButtons=function(){var t=$("

");this.$prevBtnEl=r("hopscotch-prev",j.prevBtn);this.$nextBtnEl=r("hopscotch-next",j.nextBtn);this.$doneBtnEl=r("hopscotch-done",j.doneBtn);this.$doneBtnEl.addClass("hide");this.$prevBtnEl.click(function(u){l.prevStep()});this.$nextBtnEl.click(function(u){l.nextStep()});this.$doneBtnEl.click(l.endTour);t.attr("id","hopscotch-actions").append(this.$prevBtnEl,this.$nextBtnEl,this.$doneBtnEl);this.buttonsEl=t;this.$containerEl.append(t);return this};this.initCloseButton=function(){var t=$("");t.text(j.closeTooltip).attr({id:"hopscotch-bubble-close",href:"#",title:j.closeTooltip}).click(function(v){var u=hopscotch.getCurrStepNum(),w=hopscotch.getCurrTour(),x=(u===w.steps.length-1);i.invokeCallbacks("close",[w.id,u]);l.endTour(true,x);if(v.preventDefault){v.preventDefault()}else{if(event){event.returnValue=false}}});this.closeBtnEl=t;this.$containerEl.append(t);return this};this.initArrow=function(){var u,t;this.$arrowEl=$("
").attr("id","hopscotch-bubble-arrow-container");t=$("
").addClass("hopscotch-bubble-arrow-border");u=$("
").addClass("hopscotch-bubble-arrow");this.$arrowEl.append(t,u);this.$element.append(this.$arrowEl);return this};this.renderStep=function(v,A,w,x,B){var C=this,u=i.valOrDefault(v.showNextButton,s.showNextButton),t=i.valOrDefault(v.showPrevButton,s.showPrevButton),z,y;n=v;this.setTitle(v.title?v.title:"");this.setContent(v.content?v.content:"");this.setNum(A);this.showPrevButton(this.$prevBtnEl&&t&&(A>0||w>0));this.showNextButton(this.$nextBtnEl&&u&&!x);if(x){this.$doneBtnEl.removeClass("hide")}else{this.$doneBtnEl.addClass("hide")}this.setArrow(v.orientation);z=i.getPixelValue(v.width)||s.bubbleWidth;y=i.valOrDefault(v.padding,s.bubblePadding);this.$containerEl.css({width:z+"px",padding:y+"px"});if(v.orientation==="top"){setTimeout(function(){q(C,v);if(B){B()}},5)}else{q(this,v);if(B){B()}}return this};this.setTitle=function(t){if(t){this.$titleEl.html(t).removeClass("hide")}else{this.$titleEl.addClass("hide")}return this};this.setContent=function(t){if(t){this.$contentEl.html(t).removeClass("hide")}else{this.$contentEl.addClass("hide")}return this};this.setNum=function(t){if(j.stepNums&&t0)?D[z]:D},A=function(){var D=u.steps[p].length;if(z0){--z;return true}else{if(p>0){D=u.steps[--p].length;if(D){z=D-1}else{z=undefined}return true}}return false},n=function(){return u.steps[p].length>0},w=function(){var H=s().$element,D=i.getPixelValue(H.css("top")),I=i.getStepTarget(B())[0],G=I.getBoundingClientRect(),J=G.top+i.getScrollTop(),F=(D1){t=parseInt(E[0],10);v=parseInt(E[1],10)}else{t=parseInt(t,10)}if(tourPair.length>2&&tourPair[2]==="mp"){if(v&&v0){v=0}else{v=undefined}}}}}D=s();D.showPrevButton(q.showPrevButton,true);D.showNextButton(q.showNextButton,true);return this};this.startTour=function(I,H){var E,G,F,D;if(!u){throw"Need to load a tour before you start it!"}if(document.readyState!=="complete"){a=true;return}if(typeof I!==h){p=I;z=H}else{if(u.id===C&&typeof t!==h){p=t;z=v;G=B();if(!i.getStepTarget(G)){x();G=B();if(!i.getStepTarget(G)){this.endTour(false);return}}}else{p=0}}if(!z&&n()){z=0}if(p===0&&!z){i.invokeCallbacks("start",[u.id])}this.showStep(p,z);E=s().show();if(q.animate){E.initAnimate()}this.isActive=true;return this};this.showStep=function(H,F){var K=u.steps,I=K[H],G=K.length,E=u.id+":"+H,D=s(),J;p=H;z=F;if(typeof F!==h&&n()){I=I[F];E+="-"+F}J=(H===G-1)||(F>=I.length-1);D.renderStep(I,H,F,J,w);if(I.multipage){E+=":mp"}i.setState(q.cookieName,E,1);return this};this.prevStep=function(){var E=B(),D=false;i.invokeCallbacks("prev",[u.id,p]);if(E.onPrev){E.onPrev()}if(q.skipIfNoElement){while(!D&&x()){E=B();D=i.getStepTarget(E)}if(!D){this.endTour()}}else{if(x()){E=B();if(!i.getStepTarget(E)){i.invokeCallbacks("error",[u.id,p]);return}}}this.showStep(p,z);return this};this.nextStep=function(){var E=B(),D=false;i.invokeCallbacks("next",[u.id,p]);if(E.onNext){E.onNext()}if(q.skipIfNoElement){while(!D&&A()){E=B();D=i.getStepTarget(E)}if(!D){this.endTour()}}else{if(A()){E=B();if(!i.getStepTarget(E)){i.invokeCallbacks("error",[u.id,p]);this.endTour();return}}}this.showStep(p,z);return this};this.endTour=function(F,E){var D=s();F=i.valOrDefault(F,true);E=i.valOrDefault(E,true);p=0;z=undefined;t=undefined;D.hide();if(F){i.clearState(q.cookieName)}l.isActive=false;if(E){i.invokeCallbacks("end",[u.id])}hopscotch.removeCallbacks(true);return this};this.getCurrTour=function(){return u};this.getCurrStepNum=function(){return p};this.getCurrSubstepNum=function(){return z};this.hasTakenTour=function(D){if(k){i.getState(q.cookieName+"_history")}return false};this.setHasTakenTour=function(E){var D;if(k&&!this.hasTakenTour(E)){D=i.getState(q.cookieName+"_history");if(D){D+=";"+E}else{D=E}}};this.clearHasTakenTour=function(J){var I,H,E,D,F=q.cookieName+"_history",G=false;if(k){I=i.getState(F);if(I){H=I.split(";");for(E=0,D=H.length;E");t.attr({id:v,type:"button",value:u});t.addClass("hopscotch-nav-button");if(v.indexOf("prev")>=0){t.addClass("prev")}else{t.addClass("next")}return t},p=function(u,t,w){var v=w?"hide-all":"hide";if(typeof t===h){t=true}if(t){u.removeClass(v)}else{u.addClass(v)}},q=function(B,v,I){var E,t,C,u,z,A,D,w,y=6,G=i.getStepTarget(v)[0],H=B.$element,x=B.$arrowEl,F=i.getPixelValue(v.arrowOffset);I=i.valOrDefault(I,true);E=i.getPixelValue(v.width)||s.bubbleWidth;C=i.valOrDefault(v.padding,s.bubblePadding);H.removeClass("bounce-down bounce-up bounce-left bounce-right");u=G.getBoundingClientRect();if(v.orientation==="top"){t=H.height();D=(u.top-t)-s.arrowWidth;w=u.left;A="bounce-down"}else{if(v.orientation==="bottom"){D=u.bottom+s.arrowWidth;w=u.left;A="bounce-up"}else{if(v.orientation==="left"){D=u.top;w=u.left-E-2*C-2*y-s.arrowWidth;A="bounce-right"}else{if(v.orientation==="right"){D=u.top;w=u.right+s.arrowWidth;A="bounce-left"}}}}if(!F){x.css({top:"",left:""})}else{if(v.orientation==="top"||v.orientation==="bottom"){x.css("left",F+"px")}else{if(v.orientation==="left"||v.orientation==="right"){x.css("top",F+"px")}}}w+=i.getPixelValue(v.xOffset);D+=i.getPixelValue(v.yOffset);D+=i.getScrollTop();w+=i.getScrollLeft();if(s.animate){if(!d&&s.animate){H.animate({top:D+"px",left:w+"px"})}else{H.css("top",D+"px");H.css("left",w+"px")}}else{H.css("top",D+"px");H.css("left",w+"px");if(I){z=s.smoothScroll?s.scrollDuration:0;setTimeout(function(){H.addClass(A)},z);setTimeout(function(){H.removeClass(A)},z+2000)}}};this.init=function(){var w=$("
"),u=$("
"),x=$("
"),v=this,y=false,t;this.$element=w;this.$containerEl=u;this.$titleEl=$("

");this.$numberEl=$("");this.$contentEl=$("

");this.$numberEl.attr("id","hopscotch-bubble-number");x.append(this.$titleEl,this.$contentEl).attr("id","hopscotch-bubble-content");u.attr("id","hopscotch-bubble-container").append(this.$numberEl,x);w.attr("id","hopscotch-bubble").addClass("animated").append(u);this.initNavButtons();this.initCloseButton();this.initArrow();$(window).on("resize",function(){if(y||!o){return}y=true;t=setTimeout(function(){q(v,n,false);y=false},200)});this.hide();$("body").append(w);return this};this.initNavButtons=function(){var t=$("

");this.$prevBtnEl=r("hopscotch-prev",j.prevBtn);this.$nextBtnEl=r("hopscotch-next",j.nextBtn);this.$doneBtnEl=r("hopscotch-done",j.doneBtn);this.$doneBtnEl.addClass("hide");this.$prevBtnEl.click(function(u){l.prevStep()});this.$nextBtnEl.click(function(u){l.nextStep()});this.$doneBtnEl.click(l.endTour);t.attr("id","hopscotch-actions").append(this.$prevBtnEl,this.$nextBtnEl,this.$doneBtnEl);this.buttonsEl=t;this.$containerEl.append(t);return this};this.initCloseButton=function(){var t=$("");t.text(j.closeTooltip).attr({id:"hopscotch-bubble-close",href:"#",title:j.closeTooltip}).click(function(v){var u=l.getCurrStepNum(),w=l.getCurrTour(),x=(u===w.steps.length-1);i.invokeCallbacks("close",[w.id,u]);l.endTour(true,x);if(v.preventDefault){v.preventDefault()}else{if(event){event.returnValue=false}}});this.closeBtnEl=t;this.$containerEl.append(t);return this};this.initArrow=function(){var u,t;this.$arrowEl=$("
").attr("id","hopscotch-bubble-arrow-container");t=$("
").addClass("hopscotch-bubble-arrow-border");u=$("
").addClass("hopscotch-bubble-arrow");this.$arrowEl.append(t,u);this.$element.append(this.$arrowEl);return this};this.renderStep=function(v,A,w,x,B){var C=this,u=i.valOrDefault(v.showNextButton,s.showNextButton),t=i.valOrDefault(v.showPrevButton,s.showPrevButton),z,y;n=v;this.setTitle(v.title?v.title:"");this.setContent(v.content?v.content:"");this.setNum(A);this.showPrevButton(this.$prevBtnEl&&t&&(A>0||w>0));this.showNextButton(this.$nextBtnEl&&u&&!x);this.$nextBtnEl.val(v.showSkip?j.skipBtn:j.nextBtn);if(x){this.$doneBtnEl.removeClass("hide")}else{this.$doneBtnEl.addClass("hide")}this.setArrow(v.orientation);z=i.getPixelValue(v.width)||s.bubbleWidth;y=i.valOrDefault(v.padding,s.bubblePadding);this.$containerEl.css({width:z+"px",padding:y+"px"});if(v.orientation==="top"){setTimeout(function(){q(C,v);if(B){B()}},5)}else{q(this,v);if(B){B()}}return this};this.setTitle=function(t){if(t){this.$titleEl.html(t).removeClass("hide")}else{this.$titleEl.addClass("hide")}return this};this.setContent=function(t){if(t){this.$contentEl.html(t).removeClass("hide")}else{this.$contentEl.addClass("hide")}return this};this.setNum=function(t){if(j.stepNums&&t0)?D[z]:D},n=function(){return u.steps[p].length>0},A=function(){var D=u.steps[p].length;if(z0){--z;return true}else{if(p>0){D=u.steps[--p].length;if(D){z=D-1}else{z=undefined}return true}}return false},w=function(){var H=s().$element,D=i.getPixelValue(H.css("top")),I=i.getStepTarget(B())[0],G=I.getBoundingClientRect(),J=G.top+i.getScrollTop(),F=(D1){t=parseInt(F[0],10);v=parseInt(F[1],10)}else{t=parseInt(t,10)}if(H.length>2&&H[2]==="mp"){if(v&&v0){v=0}else{v=undefined}}}}}E=s();E.showPrevButton(q.showPrevButton,true);E.showNextButton(q.showNextButton,true);return this};this.startTour=function(G,F){var D,E;if(!u){throw"Need to load a tour before you start it!"}if(document.readyState!=="complete"){a=true;return}if(typeof G!==h){p=G;z=F}else{if(u.id===C&&typeof t!==h){p=t;z=v;E=B();if(!i.getStepTarget(E)){x();E=B();if(!i.getStepTarget(E)){this.endTour(false);return}}}else{p=0}}if(!z&&n()){z=0}if(p===0&&!z){i.invokeCallbacks("start",[u.id])}this.showStep(p,z);D=s().show();if(q.animate){D.initAnimate()}this.isActive=true;return this};this.showStep=function(H,F){var K=u.steps,I=K[H],G=K.length,E=u.id+":"+H,D=s(),J;p=H;z=F;if(typeof F!==h&&n()){I=I[F];E+="-"+F}J=(H===G-1)||(F>=I.length-1);D.renderStep(I,H,F,J,w);if(I.multipage){E+=":mp"}i.setState(q.cookieName,E,1);return this};this.prevStep=function(){var E=B(),D=false;i.invokeCallbacks("prev",[u.id,p]);if(E.onPrev){E.onPrev()}if(q.skipIfNoElement){while(!D&&x()){E=B();D=i.getStepTarget(E);if(!D){i.invokeCallbacks("error",[u.id,p])}}if(!D){return this.endTour(true,false)}}else{if(x()){E=B();if(!i.getStepTarget(E)){i.invokeCallbacks("error",[u.id,p]);return this.endTour(true,false)}}}this.showStep(p,z);return this};this.nextStep=function(){var E=B(),D=false;i.invokeCallbacks("next",[u.id,p]);if(E.onNext){E.onNext()}if(q.skipIfNoElement){while(!D&&A()){E=B();D=i.getStepTarget(E);if(!D){i.invokeCallbacks("error",[u.id,p])}}if(!D){return this.endTour(true,false)}}else{if(A()){E=B();if(!i.getStepTarget(E)){i.invokeCallbacks("error",[u.id,p]);return this.endTour(true,false)}}}this.showStep(p,z);return this};this.endTour=function(F,E){var D=s();F=i.valOrDefault(F,true);E=i.valOrDefault(E,true);p=0;z=undefined;t=undefined;D.hide();if(F){i.clearState(q.cookieName)}l.isActive=false;if(E){i.invokeCallbacks("end",[u.id])}l.removeCallbacks(true);return this};this.getCurrTour=function(){return u};this.getCurrStepNum=function(){return p};this.getCurrSubstepNum=function(){return z};this.hasTakenTour=function(D){if(k){i.getState(q.cookieName+"_history")}return false};this.setHasTakenTour=function(E){var D;if(k&&!this.hasTakenTour(E)){D=i.getState(q.cookieName+"_history");if(D){D+=";"+E}else{D=E}}};this.clearHasTakenTour=function(J){var I,H,E,D,F=q.cookieName+"_history",G=false;if(k){I=i.getState(F);if(I){H=I.split(";");for(E=0,D=H.length;E 0 || subIdx > 0)); this.showNextButton(this.$nextBtnEl && showNext && !isLast); + this.$nextBtnEl.val(step.showSkip ? HopscotchI18N.skipBtn : HopscotchI18N.nextBtn); + if (isLast) { this.$doneBtnEl.removeClass('hide'); } @@ -654,6 +655,10 @@ return (step.length > 0) ? step[currSubstepNum] : step; }, + isInMultiPartStep = function() { + return currTour.steps[currStepNum].length > 0; + }, + /** * incrementStep * ============= @@ -699,10 +704,6 @@ return false; }, - isInMultiPartStep = function() { - return currTour.steps[currStepNum].length > 0; - }, - /** * adjustWindowScroll * ================== @@ -723,9 +724,6 @@ }; this.init = function() { - var tourState, - tourPair; - if (initOptions) { this.configure(initOptions); } @@ -742,7 +740,10 @@ var tmpOpt = {}, bubble, prop, + tourState, + tourPair, stepPair; + currTour = tour; // Set tour-specific configurations @@ -800,9 +801,7 @@ this.startTour = function(stepNum, substepNum) { var bubble, - step, - i, - len; + step; if (!currTour) { throw "Need to load a tour before you start it!"; @@ -847,7 +846,7 @@ } if (currStepNum === 0 && !currSubstepNum) { - utils.invokeCallbacks('start', [currTour.id]) + utils.invokeCallbacks('start', [currTour.id]); } this.showStep(currStepNum, currSubstepNum); @@ -902,9 +901,12 @@ while (!foundTarget && decrementStep()) { step = getCurrStep(); foundTarget = utils.getStepTarget(step); + if (!foundTarget) { + utils.invokeCallbacks('error', [currTour.id, currStepNum]); + } } if (!foundTarget) { - this.endTour(); + return this.endTour(true, false); } } @@ -914,7 +916,7 @@ step = getCurrStep(); if (!utils.getStepTarget(step)) { utils.invokeCallbacks('error', [currTour.id, currStepNum]); - return; + return this.endTour(true, false); } } @@ -934,24 +936,26 @@ } if (opt.skipIfNoElement) { - // decrement step until we find a target or until we reach beginning + // increment step until we find a target or until we reach beginning while (!foundTarget && incrementStep()) { step = getCurrStep(); foundTarget = utils.getStepTarget(step); + if (!foundTarget) { + utils.invokeCallbacks('error', [currTour.id, currStepNum]); + } } if (!foundTarget) { - this.endTour(); + return this.endTour(true, false); } } else if (incrementStep()) { - // only try decrementing once, and invoke error callback if no target + // only try incrementing once, and invoke error callback if no target // is found step = getCurrStep(); if (!utils.getStepTarget(step)) { utils.invokeCallbacks('error', [currTour.id, currStepNum]); - this.endTour(); - return; + return this.endTour(true, false); } } this.showStep(currStepNum, currSubstepNum); @@ -982,7 +986,7 @@ utils.invokeCallbacks('end', [currTour.id]); } - hopscotch.removeCallbacks(true); + winHopscotch.removeCallbacks(true); return this; }; @@ -1097,9 +1101,8 @@ showNextButton: true, bubbleWidth: 280, bubblePadding: 15, - bubbleBorder: 6, arrowWidth: 20, - skipIfNoElement: false, + skipIfNoElement: true, cookieName: 'hopscotch.tour.state' }; }; @@ -1110,7 +1113,6 @@ * VALID OPTIONS INCLUDE... * bubbleWidth: Number - Default bubble width. Defaults to 280. * bubblePadding: Number - Default bubble padding. Defaults to 15. - * bubbleBorder: Number - Default bubble border width. Defaults to 6. * animate: Boolean - should the tour bubble animate between steps? * Defaults to FALSE. * smoothScroll: Boolean - should the page scroll smoothly to the next @@ -1133,7 +1135,7 @@ * use own CSS. Defaults to 28. * skipIfNoElement Boolean - If a specified target element is not found, * should we skip to the next step? Defaults to - * FALSE. + * TRUE. * onNext: Function - A callback to be invoked after every click on * a "Next" button. *