2 (function ($, window
, document
, undefined) {
5 var Modernizr
= Modernizr
|| false;
7 Foundation
.libs
.joyride
= {
13 expose
: false, // turn on or off the expose feature
14 modal
: true, // Whether to cover page with modal during the tour
15 keyboard
: true, // enable left, right and esc keystrokes
16 tip_location
: 'bottom', // 'top' or 'bottom' in relation to parent
17 nub_position
: 'auto', // override on a per tooltip bases
18 scroll_speed
: 1500, // Page scrolling speed in milliseconds, 0 = no scroll animation
19 scroll_animation
: 'linear', // supports 'swing' and 'linear', extend with jQuery UI.
20 timer
: 0, // 0 = no timer , all other numbers = timer in milliseconds
21 start_timer_on_click
: true, // true or false - true requires clicking the first button start the timer
22 start_offset
: 0, // the index of the tooltip you want to start on (index of the li)
23 next_button
: true, // true or false to control whether a next button is used
24 prev_button
: true, // true or false to control whether a prev button is used
25 tip_animation
: 'fade', // 'pop' or 'fade' in each tip
26 pause_after
: [], // array of indexes where to pause the tour after
27 exposed
: [], // array of expose elements
28 tip_animation_fade_speed
: 300, // when tipAnimation = 'fade' this is speed in milliseconds for the transition
29 cookie_monster
: false, // true or false to control whether cookies are used
30 cookie_name
: 'joyride', // Name the cookie you'll use
31 cookie_domain
: false, // Will this cookie be attached to a domain, ie. '.notableapp.com'
32 cookie_expires
: 365, // set when you would like the cookie to expire.
33 tip_container
: 'body', // Where will the tip be attached
34 abort_on_close
: true, // When true, the close event will not fire any callback
35 tip_location_patterns
: {
37 bottom
: [], // bottom should not need to be repositioned
38 left
: ['right', 'top', 'bottom'],
39 right
: ['left', 'top', 'bottom']
41 post_ride_callback: function () {
42 }, // A method to call once the tour closes (canceled or complete)
43 post_step_callback: function () {
44 }, // A method to call after each step
45 pre_step_callback: function () {
46 }, // A method to call before each step
47 pre_ride_callback: function () {
48 }, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
49 post_expose_callback: function () {
50 }, // A method to call after an element has been exposed
51 template
: { // HTML segments for tip layout
52 link
: '<a href="#close" class="joyride-close-tip">×</a>',
53 timer
: '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
54 tip
: '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
55 wrapper
: '<div class="joyride-content-wrapper"></div>',
56 button
: '<a href="#" class="small button joyride-next-tip"></a>',
57 prev_button
: '<a href="#" class="small button joyride-prev-tip"></a>',
58 modal
: '<div class="joyride-modal-bg"></div>',
59 expose
: '<div class="joyride-expose-wrapper"></div>',
60 expose_cover
: '<div class="joyride-expose-cover"></div>'
62 expose_add_class
: '' // One or more space-separated class names to be added to exposed element
65 init: function (scope
, method
, options
) {
66 Foundation
.inherit(this, 'throttle random_str');
68 this.settings
= this.settings
|| $.extend({}, this.defaults
, (options
|| method
));
70 this.bindings(method
, options
)
73 go_next: function () {
74 if (this.settings
.$li
.next().length
< 1) {
76 } else if (this.settings
.timer
> 0) {
77 clearTimeout(this.settings
.automate
);
87 go_prev: function () {
88 if (this.settings
.$li
.prev().length
< 1) {
89 // Do nothing if there are no prev element
90 } else if (this.settings
.timer
> 0) {
91 clearTimeout(this.settings
.automate
);
93 this.show(null, true);
97 this.show(null, true);
101 events: function () {
106 .on('click.fndtn.joyride', '.joyride-next-tip, .joyride-modal-bg', function (e
) {
110 .on('click.fndtn.joyride', '.joyride-prev-tip', function (e
) {
115 .on('click.fndtn.joyride', '.joyride-close-tip', function (e
) {
117 this.end(this.settings
.abort_on_close
);
120 .on('keyup.fndtn.joyride', function (e
) {
121 // Don't do anything if keystrokes are disabled
122 // or if the joyride is not being shown
123 if (!this.settings
.keyboard
|| !this.settings
.riding
) return;
126 case 39: // right arrow
130 case 37: // left arrow
136 this.end(this.settings
.abort_on_close
);
142 .on('resize.fndtn.joyride', self
.throttle(function () {
143 if ($('[' + self
.attr_name() + ']').length
> 0 && self
.settings
.$next_tip
&& self
.settings
.riding
) {
144 if (self
.settings
.exposed
.length
> 0) {
145 var $els
= $(self
.settings
.exposed
);
147 $els
.each(function () {
149 self
.un_expose($this);
154 if (self
.is_phone()) {
157 self
.pos_default(false);
165 $this = $('[' + this.attr_name() + ']', this.scope
),
166 integer_settings
= ['timer', 'scrollSpeed', 'startOffset', 'tipAnimationFadeSpeed', 'cookieExpires'],
167 int_settings_count
= integer_settings
.length
;
169 if (!$this.length
> 0) return;
171 if (!this.settings
.init
) this.events();
173 this.settings
= $this.data(this.attr_name(true) + '-init');
175 // non configureable settings
176 this.settings
.$content_el
= $this;
177 this.settings
.$body
= $(this.settings
.tip_container
);
178 this.settings
.body_offset
= $(this.settings
.tip_container
).position();
179 this.settings
.$tip_content
= this.settings
.$content_el
.find('> li');
180 this.settings
.paused
= false;
181 this.settings
.attempts
= 0;
182 this.settings
.riding
= true;
184 // can we create cookies?
185 if (typeof $.cookie
!== 'function') {
186 this.settings
.cookie_monster
= false;
189 // generate the tips and insert into dom.
190 if (!this.settings
.cookie_monster
|| this.settings
.cookie_monster
&& !$.cookie(this.settings
.cookie_name
)) {
191 this.settings
.$tip_content
.each(function (index
) {
193 this.settings
= $.extend({}, self
.defaults
, self
.data_options($this));
195 // Make sure that settings parsed from data_options are integers where necessary
196 var i
= int_settings_count
;
198 self
.settings
[integer_settings
[i
]] = parseInt(self
.settings
[integer_settings
[i
]], 10);
200 self
.create({$li
: $this, index
: index
});
204 if (!this.settings
.start_timer_on_click
&& this.settings
.timer
> 0) {
214 resume: function () {
219 tip_template: function (opts
) {
222 opts
.tip_class
= opts
.tip_class
|| '';
224 $blank
= $(this.settings
.template
.tip
).addClass(opts
.tip_class
);
225 content
= $.trim($(opts
.li
).html()) +
226 this.prev_button_text(opts
.prev_button_text
, opts
.index
) +
227 this.button_text(opts
.button_text
) +
228 this.settings
.template
.link
+
229 this.timer_instance(opts
.index
);
231 $blank
.append($(this.settings
.template
.wrapper
));
232 $blank
.first().attr(this.add_namespace('data-index'), opts
.index
);
233 $('.joyride-content-wrapper', $blank
).append(content
);
238 timer_instance: function (index
) {
241 if ((index
=== 0 && this.settings
.start_timer_on_click
&& this.settings
.timer
> 0) || this.settings
.timer
=== 0) {
244 txt
= $(this.settings
.template
.timer
)[0].outerHTML
;
249 button_text: function (txt
) {
250 if (this.settings
.tip_settings
.next_button
) {
251 txt
= $.trim(txt
) || 'Next';
252 txt
= $(this.settings
.template
.button
).append(txt
)[0].outerHTML
;
259 prev_button_text: function (txt
, idx
) {
260 if (this.settings
.tip_settings
.prev_button
) {
261 txt
= $.trim(txt
) || 'Previous';
263 // Add the disabled class to the button if it's the first element
265 txt
= $(this.settings
.template
.prev_button
).append(txt
).addClass('disabled')[0].outerHTML
;
267 txt
= $(this.settings
.template
.prev_button
).append(txt
)[0].outerHTML
;
274 create: function (opts
) {
275 this.settings
.tip_settings
= $.extend({}, this.settings
, this.data_options(opts
.$li
));
276 var buttonText
= opts
.$li
.attr(this.add_namespace('data-button'))
277 || opts
.$li
.attr(this.add_namespace('data-text')),
278 prevButtonText
= opts
.$li
.attr(this.add_namespace('data-button-prev'))
279 || opts
.$li
.attr(this.add_namespace('data-prev-text')),
280 tipClass
= opts
.$li
.attr('class'),
281 $tip_content
= $(this.tip_template({
284 button_text
: buttonText
,
285 prev_button_text
: prevButtonText
,
289 $(this.settings
.tip_container
).append($tip_content
);
292 show: function (init
, is_prev
) {
296 if (this.settings
.$li
=== undefined
297 || ($.inArray(this.settings
.$li
.index(), this.settings
.pause_after
) === -1)) {
299 // don't go to the next li if the tour was paused
300 if (this.settings
.paused
) {
301 this.settings
.paused
= false;
303 this.set_li(init
, is_prev
);
306 this.settings
.attempts
= 0;
308 if (this.settings
.$li
.length
&& this.settings
.$target
.length
> 0) {
309 if (init
) { //run when we first start
310 this.settings
.pre_ride_callback(this.settings
.$li
.index(), this.settings
.$next_tip
);
311 if (this.settings
.modal
) {
316 this.settings
.pre_step_callback(this.settings
.$li
.index(), this.settings
.$next_tip
);
318 if (this.settings
.modal
&& this.settings
.expose
) {
322 this.settings
.tip_settings
= $.extend({}, this.settings
, this.data_options(this.settings
.$li
));
324 this.settings
.timer
= parseInt(this.settings
.timer
, 10);
326 this.settings
.tip_settings
.tip_location_pattern
= this.settings
.tip_location_patterns
[this.settings
.tip_settings
.tip_location
];
328 // scroll and hide bg if not modal
329 if (!/body/i.test(this.settings
.$target
.selector
)) {
330 var joyridemodalbg
= $('.joyride-modal-bg');
331 if (/pop/i.test(this.settings
.tipAnimation
)) {
332 joyridemodalbg
.hide();
334 joyridemodalbg
.fadeOut(this.settings
.tipAnimationFadeSpeed
);
339 if (this.is_phone()) {
340 this.pos_phone(true);
342 this.pos_default(true);
345 $timer
= this.settings
.$next_tip
.find('.joyride-timer-indicator');
347 if (/pop/i.test(this.settings
.tip_animation
)) {
351 if (this.settings
.timer
> 0) {
353 this.settings
.$next_tip
.show();
355 setTimeout(function () {
357 width
: $timer
.parent().width()
358 }, this.settings
.timer
, 'linear');
359 }.bind(this), this.settings
.tip_animation_fade_speed
);
362 this.settings
.$next_tip
.show();
367 } else if (/fade/i.test(this.settings
.tip_animation
)) {
371 if (this.settings
.timer
> 0) {
373 this.settings
.$next_tip
374 .fadeIn(this.settings
.tip_animation_fade_speed
)
377 setTimeout(function () {
379 width
: $timer
.parent().width()
380 }, this.settings
.timer
, 'linear');
381 }.bind(this), this.settings
.tip_animation_fade_speed
);
384 this.settings
.$next_tip
.fadeIn(this.settings
.tip_animation_fade_speed
);
388 this.settings
.$current_tip
= this.settings
.$next_tip
;
390 // skip non-existant targets
391 } else if (this.settings
.$li
&& this.settings
.$target
.length
< 1) {
393 this.show(init
, is_prev
);
402 this.settings
.paused
= true;
408 is_phone: function () {
409 return matchMedia(Foundation
.media_queries
.small
).matches
&& !matchMedia(Foundation
.media_queries
.medium
).matches
;
413 if (this.settings
.modal
&& this.settings
.expose
) {
417 if (!this.settings
.modal
) {
418 $('.joyride-modal-bg').hide();
421 // Prevent scroll bouncing...wait to remove from layout
422 this.settings
.$current_tip
.css('visibility', 'hidden');
423 setTimeout($.proxy(function () {
425 this.css('visibility', 'visible');
426 }, this.settings
.$current_tip
), 0);
427 this.settings
.post_step_callback(this.settings
.$li
.index(),
428 this.settings
.$current_tip
);
431 set_li: function (init
, is_prev
) {
433 this.settings
.$li
= this.settings
.$tip_content
.eq(this.settings
.start_offset
);
435 this.settings
.$current_tip
= this.settings
.$next_tip
;
438 this.settings
.$li
= this.settings
.$li
.prev();
440 this.settings
.$li
= this.settings
.$li
.next();
447 set_next_tip: function () {
448 this.settings
.$next_tip
= $('.joyride-tip-guide').eq(this.settings
.$li
.index());
449 this.settings
.$next_tip
.data('closed', '');
452 set_target: function () {
453 var cl
= this.settings
.$li
.attr(this.add_namespace('data-class')),
454 id
= this.settings
.$li
.attr(this.add_namespace('data-id')),
457 return $(document
.getElementById(id
));
459 return $('.' + cl
).first();
465 this.settings
.$target
= $sel();
468 scroll_to: function () {
469 var window_half
, tipOffset
;
471 window_half
= $(window
).height() / 2;
472 tipOffset
= Math
.ceil(this.settings
.$target
.offset().top
- window_half
+ this.settings
.$next_tip
.outerHeight());
474 if (tipOffset
!= 0) {
475 $('html, body').stop().animate({
477 }, this.settings
.scroll_speed
, 'swing');
481 paused: function () {
482 return ($.inArray((this.settings
.$li
.index() + 1), this.settings
.pause_after
) === -1);
485 restart: function () {
487 this.settings
.$li
= undefined;
491 pos_default: function (init
) {
492 var $nub
= this.settings
.$next_tip
.find('.joyride-nub'),
493 nub_width
= Math
.ceil($nub
.outerWidth() / 2),
494 nub_height
= Math
.ceil($nub
.outerHeight() / 2),
495 toggle
= init
|| false;
497 // tip must not be "display: none" to calculate position
499 this.settings
.$next_tip
.css('visibility', 'hidden');
500 this.settings
.$next_tip
.show();
503 if (!/body/i.test(this.settings
.$target
.selector
)) {
504 var topAdjustment
= this.settings
.tip_settings
.tipAdjustmentY
? parseInt(this.settings
.tip_settings
.tipAdjustmentY
) : 0,
505 leftAdjustment
= this.settings
.tip_settings
.tipAdjustmentX
? parseInt(this.settings
.tip_settings
.tipAdjustmentX
) : 0;
509 this.settings
.$next_tip
.css({
510 top
: (this.settings
.$target
.offset().top
+ nub_height
+ this.settings
.$target
.outerHeight() + topAdjustment
),
511 left
: this.settings
.$target
.offset().left
+ this.settings
.$target
.outerWidth() - this.settings
.$next_tip
.outerWidth() + leftAdjustment
514 this.settings
.$next_tip
.css({
515 top
: (this.settings
.$target
.offset().top
+ nub_height
+ this.settings
.$target
.outerHeight() + topAdjustment
),
516 left
: this.settings
.$target
.offset().left
+ leftAdjustment
520 this.nub_position($nub
, this.settings
.tip_settings
.nub_position
, 'top');
522 } else if (this.top()) {
524 this.settings
.$next_tip
.css({
525 top
: (this.settings
.$target
.offset().top
- this.settings
.$next_tip
.outerHeight() - nub_height
+ topAdjustment
),
526 left
: this.settings
.$target
.offset().left
+ this.settings
.$target
.outerWidth() - this.settings
.$next_tip
.outerWidth()
529 this.settings
.$next_tip
.css({
530 top
: (this.settings
.$target
.offset().top
- this.settings
.$next_tip
.outerHeight() - nub_height
+ topAdjustment
),
531 left
: this.settings
.$target
.offset().left
+ leftAdjustment
535 this.nub_position($nub
, this.settings
.tip_settings
.nub_position
, 'bottom');
537 } else if (this.right()) {
539 this.settings
.$next_tip
.css({
540 top
: this.settings
.$target
.offset().top
+ topAdjustment
,
541 left
: (this.settings
.$target
.outerWidth() + this.settings
.$target
.offset().left
+ nub_width
+ leftAdjustment
)
544 this.nub_position($nub
, this.settings
.tip_settings
.nub_position
, 'left');
546 } else if (this.left()) {
548 this.settings
.$next_tip
.css({
549 top
: this.settings
.$target
.offset().top
+ topAdjustment
,
550 left
: (this.settings
.$target
.offset().left
- this.settings
.$next_tip
.outerWidth() - nub_width
+ leftAdjustment
)
553 this.nub_position($nub
, this.settings
.tip_settings
.nub_position
, 'right');
557 if (!this.visible(this.corners(this.settings
.$next_tip
)) && this.settings
.attempts
< this.settings
.tip_settings
.tip_location_pattern
.length
) {
559 $nub
.removeClass('bottom')
561 .removeClass('right')
562 .removeClass('left');
564 this.settings
.tip_settings
.tip_location
= this.settings
.tip_settings
.tip_location_pattern
[this.settings
.attempts
];
566 this.settings
.attempts
++;
572 } else if (this.settings
.$li
.length
) {
574 this.pos_modal($nub
);
579 this.settings
.$next_tip
.hide();
580 this.settings
.$next_tip
.css('visibility', 'visible');
585 pos_phone: function (init
) {
586 var tip_height
= this.settings
.$next_tip
.outerHeight(),
587 tip_offset
= this.settings
.$next_tip
.offset(),
588 target_height
= this.settings
.$target
.outerHeight(),
589 $nub
= $('.joyride-nub', this.settings
.$next_tip
),
590 nub_height
= Math
.ceil($nub
.outerHeight() / 2),
591 toggle
= init
|| false;
593 $nub
.removeClass('bottom')
595 .removeClass('right')
596 .removeClass('left');
599 this.settings
.$next_tip
.css('visibility', 'hidden');
600 this.settings
.$next_tip
.show();
603 if (!/body/i.test(this.settings
.$target
.selector
)) {
607 this.settings
.$next_tip
.offset({top
: this.settings
.$target
.offset().top
- tip_height
- nub_height
});
608 $nub
.addClass('bottom');
612 this.settings
.$next_tip
.offset({top
: this.settings
.$target
.offset().top
+ target_height
+ nub_height
});
613 $nub
.addClass('top');
617 } else if (this.settings
.$li
.length
) {
618 this.pos_modal($nub
);
622 this.settings
.$next_tip
.hide();
623 this.settings
.$next_tip
.css('visibility', 'visible');
627 pos_modal: function ($nub
) {
634 show_modal: function () {
635 if (!this.settings
.$next_tip
.data('closed')) {
636 var joyridemodalbg
= $('.joyride-modal-bg');
637 if (joyridemodalbg
.length
< 1) {
638 var joyridemodalbg
= $(this.settings
.template
.modal
);
639 joyridemodalbg
.appendTo('body');
642 if (/pop/i.test(this.settings
.tip_animation
)) {
643 joyridemodalbg
.show();
645 joyridemodalbg
.fadeIn(this.settings
.tip_animation_fade_speed
);
650 expose: function () {
656 randId
= 'expose-' + this.random_str(6);
658 if (arguments
.length
> 0 && arguments
[0] instanceof $) {
660 } else if (this.settings
.$target
&& !/body/i.test(this.settings
.$target
.selector
)) {
661 el
= this.settings
.$target
;
667 if (window
.console
) {
668 console
.error('element not valid', el
);
673 expose
= $(this.settings
.template
.expose
);
674 this.settings
.$body
.append(expose
);
676 top
: el
.offset().top
,
677 left
: el
.offset().left
,
678 width
: el
.outerWidth(true),
679 height
: el
.outerHeight(true)
682 exposeCover
= $(this.settings
.template
.expose_cover
);
685 zIndex
: el
.css('z-index'),
686 position
: el
.css('position')
689 origClasses
= el
.attr('class') == null ? '' : el
.attr('class');
691 el
.css('z-index', parseInt(expose
.css('z-index')) + 1);
693 if (origCSS
.position
== 'static') {
694 el
.css('position', 'relative');
697 el
.data('expose-css', origCSS
);
698 el
.data('orig-class', origClasses
);
699 el
.attr('class', origClasses
+ ' ' + this.settings
.expose_add_class
);
702 top
: el
.offset().top
,
703 left
: el
.offset().left
,
704 width
: el
.outerWidth(true),
705 height
: el
.outerHeight(true)
708 if (this.settings
.modal
) this.show_modal();
710 this.settings
.$body
.append(exposeCover
);
711 expose
.addClass(randId
);
712 exposeCover
.addClass(randId
);
713 el
.data('expose', randId
);
714 this.settings
.post_expose_callback(this.settings
.$li
.index(), this.settings
.$next_tip
, el
);
715 this.add_exposed(el
);
718 un_expose: function () {
726 if (arguments
.length
> 0 && arguments
[0] instanceof $) {
728 } else if (this.settings
.$target
&& !/body/i.test(this.settings
.$target
.selector
)) {
729 el
= this.settings
.$target
;
735 if (window
.console
) {
736 console
.error('element not valid', el
);
741 exposeId
= el
.data('expose');
742 expose
= $('.' + exposeId
);
744 if (arguments
.length
> 1) {
745 clearAll
= arguments
[1];
748 if (clearAll
=== true) {
749 $('.joyride-expose-wrapper,.joyride-expose-cover').remove();
754 origCSS
= el
.data('expose-css');
756 if (origCSS
.zIndex
== 'auto') {
757 el
.css('z-index', '');
759 el
.css('z-index', origCSS
.zIndex
);
762 if (origCSS
.position
!= el
.css('position')) {
763 if (origCSS
.position
== 'static') {// this is default, no need to set it.
764 el
.css('position', '');
766 el
.css('position', origCSS
.position
);
770 origClasses
= el
.data('orig-class');
771 el
.attr('class', origClasses
);
772 el
.removeData('orig-classes');
774 el
.removeData('expose');
775 el
.removeData('expose-z-index');
776 this.remove_exposed(el
);
779 add_exposed: function (el
) {
780 this.settings
.exposed
= this.settings
.exposed
|| [];
781 if (el
instanceof $ || typeof el
=== 'object') {
782 this.settings
.exposed
.push(el
[0]);
783 } else if (typeof el
== 'string') {
784 this.settings
.exposed
.push(el
);
788 remove_exposed: function (el
) {
790 if (el
instanceof $) {
792 } else if (typeof el
== 'string') {
796 this.settings
.exposed
= this.settings
.exposed
|| [];
797 i
= this.settings
.exposed
.length
;
800 if (this.settings
.exposed
[i
] == search
) {
801 this.settings
.exposed
.splice(i
, 1);
807 center: function () {
810 this.settings
.$next_tip
.css({
811 top
: ((($w
.height() - this.settings
.$next_tip
.outerHeight()) / 2) + $w
.scrollTop()),
812 left
: ((($w
.width() - this.settings
.$next_tip
.outerWidth()) / 2) + $w
.scrollLeft())
818 bottom: function () {
819 return /bottom/i.test(this.settings
.tip_settings
.tip_location
);
823 return /top/i.test(this.settings
.tip_settings
.tip_location
);
827 return /right/i.test(this.settings
.tip_settings
.tip_location
);
831 return /left/i.test(this.settings
.tip_settings
.tip_location
);
834 corners: function (el
) {
836 window_half
= w
.height() / 2,
837 //using this to calculate since scroll may not have finished yet.
838 tipOffset
= Math
.ceil(this.settings
.$target
.offset().top
- window_half
+ this.settings
.$next_tip
.outerHeight()),
839 right
= w
.width() + w
.scrollLeft(),
840 offsetBottom
= w
.height() + tipOffset
,
841 bottom
= w
.height() + w
.scrollTop(),
844 if (tipOffset
< top
) {
852 if (offsetBottom
> bottom
) {
853 bottom
= offsetBottom
;
857 el
.offset().top
< top
,
858 right
< el
.offset().left
+ el
.outerWidth(),
859 bottom
< el
.offset().top
+ el
.outerHeight(),
860 w
.scrollLeft() > el
.offset().left
864 visible: function (hidden_corners
) {
865 var i
= hidden_corners
.length
;
868 if (hidden_corners
[i
]) return false;
874 nub_position: function (nub
, pos
, def
) {
875 if (pos
=== 'auto') {
882 startTimer: function () {
883 if (this.settings
.$li
.length
) {
884 this.settings
.automate
= setTimeout(function () {
888 }.bind(this), this.settings
.timer
);
890 clearTimeout(this.settings
.automate
);
894 end: function (abort
) {
895 if (this.settings
.cookie_monster
) {
896 $.cookie(this.settings
.cookie_name
, 'ridden', {
897 expires
: this.settings
.cookie_expires
,
898 domain
: this.settings
.cookie_domain
902 if (this.settings
.timer
> 0) {
903 clearTimeout(this.settings
.automate
);
906 if (this.settings
.modal
&& this.settings
.expose
) {
910 // Unplug keystrokes listener
911 $(this.scope
).off('keyup.joyride')
913 this.settings
.$next_tip
.data('closed', true);
914 this.settings
.riding
= false;
916 $('.joyride-modal-bg').hide();
917 this.settings
.$current_tip
.hide();
919 if (typeof abort
=== 'undefined' || abort
=== false) {
920 this.settings
.post_step_callback(this.settings
.$li
.index(), this.settings
.$current_tip
);
921 this.settings
.post_ride_callback(this.settings
.$li
.index(), this.settings
.$current_tip
);
924 $('.joyride-tip-guide').remove();
928 $(this.scope
).off('.joyride');
929 $(window
).off('.joyride');
930 $('.joyride-close-tip, .joyride-next-tip, .joyride-modal-bg').off('.joyride');
931 $('.joyride-tip-guide, .joyride-modal-bg').remove();
932 clearTimeout(this.settings
.automate
);
936 reflow: function () {
939 }(jQuery
, window
, window
.document
));