Skip to content

Commit bda77ab

Browse files
committed
Fix title link from dissapearing from subnav for navigation dropdowns on medium screen displays
1 parent 60f249a commit bda77ab

2 files changed

Lines changed: 768 additions & 40 deletions

File tree

assets/js/javascript.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
810810

811811
// comma delimited list of selectors that, on click, will close clearing,
812812
// add 'div.clearing-blackout, div.visible-img' to close on background click
813-
close_selectors : '.clearing-close, div.clearing-blackout',
813+
close_selectors : '.clearing-close, div.clearing-blackout',
814814

815815
// Default to the entire li element.
816816
open_selectors : '',
@@ -954,7 +954,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
954954
if ($el.parent().hasClass('carousel')) {
955955
return;
956956
}
957-
957+
958958
$el.after('<div id="foundationClearingHolder"></div>');
959959

960960
var grid = $el.detach(),
@@ -965,7 +965,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
965965
} else {
966966
grid_outerHTML = grid[0].outerHTML;
967967
}
968-
968+
969969
var holder = this.S('#foundationClearingHolder'),
970970
settings = $el.data(this.attr_name(true) + '-init'),
971971
data = {
@@ -1066,7 +1066,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
10661066
.removeClass('clearing-blackout');
10671067
container.removeClass('clearing-container');
10681068
visible_image.hide();
1069-
visible_image.trigger('closed.fndtn.clearing');
1069+
visible_image.trigger('closed.fndtn.clearing');
10701070
}
10711071

10721072
// Event to re-enable scrolling on touch devices
@@ -1230,7 +1230,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
12301230
.hide();
12311231
}
12321232
return this;
1233-
},
1233+
},
12341234

12351235
// directional methods
12361236

@@ -1422,7 +1422,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
14221422

14231423
if ($this.data(self.data_attr())) {
14241424
settings = $this.data(self.data_attr(true) + '-init') || self.settings;
1425-
}
1425+
}
14261426
else {
14271427
var target = S('[' + self.attr_name() + '="' + S(this).attr('id') + '"]'),
14281428
settings = target.data(self.attr_name(true) + '-init') || self.settings;
@@ -1593,13 +1593,13 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
15931593

15941594
p.top -= o.top;
15951595
p.left -= o.left;
1596-
1596+
15971597
//set some flags on the p object to pass along
15981598
p.missRight = false;
15991599
p.missTop = false;
16001600
p.missLeft = false;
16011601
p.leftRightFlag = false;
1602-
1602+
16031603
//lets see if the panel will be off the screen
16041604
//get the actual width of the page and store it
16051605
var actualBodyWidth;
@@ -1611,21 +1611,21 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
16111611

16121612
var actualMarginWidth = (window.outerWidth - actualBodyWidth) / 2;
16131613
var actualBoundary = actualBodyWidth;
1614-
1614+
16151615
if (!this.hasClass('mega')) {
16161616
//miss top
16171617
if (t.offset().top <= this.outerHeight()) {
16181618
p.missTop = true;
16191619
actualBoundary = window.outerWidth - actualMarginWidth;
16201620
p.leftRightFlag = true;
16211621
}
1622-
1622+
16231623
//miss right
16241624
if (t.offset().left + this.outerWidth() > t.offset().left + actualMarginWidth && t.offset().left - actualMarginWidth > this.outerWidth()) {
16251625
p.missRight = true;
16261626
p.missLeft = false;
16271627
}
1628-
1628+
16291629
//miss left
16301630
if (t.offset().left - this.outerWidth() <= 0) {
16311631
p.missLeft = true;
@@ -1641,12 +1641,12 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
16411641
p = self.dirs._base.call(this, t);
16421642

16431643
this.addClass('drop-top');
1644-
1644+
16451645
if (p.missTop == true) {
16461646
p.top = p.top + t.outerHeight() + this.outerHeight();
16471647
this.removeClass('drop-top');
16481648
}
1649-
1649+
16501650
if (p.missRight == true) {
16511651
p.left = p.left - this.outerWidth() + t.outerWidth();
16521652
}
@@ -1686,7 +1686,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
16861686
var p = Foundation.libs.dropdown.dirs._base.call(this, t);
16871687

16881688
this.addClass('drop-left');
1689-
1689+
16901690
if (p.missLeft == true) {
16911691
p.left = p.left + this.outerWidth();
16921692
p.top = p.top + t.outerHeight();
@@ -1700,15 +1700,15 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
17001700
var p = Foundation.libs.dropdown.dirs._base.call(this, t);
17011701

17021702
this.addClass('drop-right');
1703-
1703+
17041704
if (p.missRight == true) {
17051705
p.left = p.left - this.outerWidth();
17061706
p.top = p.top + t.outerHeight();
17071707
this.removeClass('drop-right');
17081708
} else {
17091709
p.triggeredRight = true;
17101710
}
1711-
1711+
17121712
var self = Foundation.libs.dropdown;
17131713

17141714
if (t.outerWidth() < this.outerWidth() || self.small() || this.hasClass(s.mega_menu)) {
@@ -1738,15 +1738,15 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
17381738
sel_after = '.f-dropdown.open:after',
17391739
css_before = 'left: ' + pip_offset_base + 'px;',
17401740
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
1741-
1741+
17421742
if (position.missRight == true) {
17431743
pip_offset_base = dropdown.outerWidth() - 23;
17441744
sel_before = '.f-dropdown.open:before',
17451745
sel_after = '.f-dropdown.open:after',
17461746
css_before = 'left: ' + pip_offset_base + 'px;',
17471747
css_after = 'left: ' + (pip_offset_base - 1) + 'px;';
17481748
}
1749-
1749+
17501750
//just a case where right is fired, but its not missing right
17511751
if (position.triggeredRight == true) {
17521752
sel_before = '.f-dropdown.open:before',
@@ -1880,7 +1880,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
18801880
throttle_delay: 30, // calculation throttling to increase framerate
18811881
fixed_top: 0, // top distance in pixels assigend to the fixed element on scroll
18821882
offset_by_height: true, // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
1883-
duration: 700, // animation duration time
1883+
duration: 700, // animation duration time
18841884
easing: 'swing' // animation easing
18851885
},
18861886

@@ -2431,7 +2431,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
24312431
if (!$dropdown.find('.title.back').length) {
24322432

24332433
if (settings.mobile_show_parent_link == true && url) {
2434-
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="parent-link show-for-small-only"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
2434+
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5></li><li class="hide-for-large-up"><a class="parent-link js-generated" href="' + url + '">' + $link.html() +'</a></li>');
24352435
} else {
24362436
$titleLi = $('<li class="title back js-generated"><h5><a href="javascript:void(0)"></a></h5>');
24372437
}
@@ -2561,7 +2561,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
25612561
.off('.reveal')
25622562
.on('click.fndtn.reveal', '[' + this.add_namespace('data-reveal-id') + ']:not([disabled])', function (e) {
25632563
e.preventDefault();
2564-
2564+
25652565
if (!self.locked) {
25662566
var element = S(this),
25672567
ajax = element.data(self.data_attr('reveal-ajax'));
@@ -2754,7 +2754,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
27542754
toggle_bg : function (el, modal, state) {
27552755
var settings = el.data(this.attr_name(true) + '-init') || this.settings,
27562756
bg_root_element = settings.bg_root_element; // Adding option to specify the background root element fixes scrolling issue
2757-
2757+
27582758
if (this.S('.' + this.settings.bg_class).length === 0) {
27592759
this.settings.bg = $('<div />', {'class': this.settings.bg_class})
27602760
.appendTo(bg_root_element).hide();
@@ -3036,7 +3036,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
30363036
};
30373037

30383038
/* STYLES
3039-
*
3039+
*
30403040
* Baked-in styles that we'll apply to our elements.
30413041
* In an effort to keep the plugin simple, these are not exposed as options.
30423042
* That said, anyone can override these in their own stylesheet.
@@ -3080,7 +3080,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
30803080
// Preload images
30813081
$.each(this.images, function () {
30823082
$('<img />')[0].src = this;
3083-
});
3083+
});
30843084

30853085
// Convenience reference to know if the container is body.
30863086
this.isBody = container === document.body;
@@ -3110,7 +3110,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
31103110
, zIndex: zIndex === 'auto' ? 0 : zIndex
31113111
, background: 'none'
31123112
});
3113-
3113+
31143114
// Needs a higher z-index
31153115
this.$wrap.css({zIndex: -999998});
31163116
}
@@ -3186,7 +3186,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
31863186
, evtOptions = { relatedTarget: self.$container[0] };
31873187

31883188
// Trigger the "before" event
3189-
self.$container.trigger($.Event('backstretch.before', evtOptions), [self, newIndex]);
3189+
self.$container.trigger($.Event('backstretch.before', evtOptions), [self, newIndex]);
31903190

31913191
// Set the new index
31923192
this.index = newIndex;
@@ -3200,7 +3200,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
32003200
.bind('load', function (e) {
32013201
var imgWidth = this.width || $(e.target).width()
32023202
, imgHeight = this.height || $(e.target).height();
3203-
3203+
32043204
// Save the ratio
32053205
$(this).data('ratio', imgWidth / imgHeight);
32063206

@@ -3279,7 +3279,7 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
32793279

32803280
// Remove Backstretch
32813281
if(!preserveBackground) {
3282-
this.$wrap.remove();
3282+
this.$wrap.remove();
32833283
}
32843284
this.$container.removeData('backstretch');
32853285
}
@@ -3314,23 +3314,23 @@ function FastClick(a,b){"use strict";function c(a,b){return function(){return a.
33143314
return !(
33153315
// iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
33163316
((platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1 || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534) ||
3317-
3317+
33183318
// Opera Mini
33193319
(window.operamini && ({}).toString.call( window.operamini ) === "[object OperaMini]") ||
33203320
(operammobilematch && omversion < 7458) ||
3321-
3321+
33223322
//Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
33233323
(ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533) ||
3324-
3324+
33253325
// Firefox Mobile before 6.0 -
33263326
(ffversion && ffversion < 6) ||
3327-
3327+
33283328
// WebOS less than 3
33293329
("palmGetResource" in window && wkversion && wkversion < 534) ||
3330-
3330+
33313331
// MeeGo
33323332
(ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1) ||
3333-
3333+
33343334
// IE6
33353335
(ieversion && ieversion <= 6)
33363336
);
@@ -3346,4 +3346,4 @@ $(document).foundation({
33463346
animation: 'fade',
33473347
animation_speed: 250
33483348
}
3349-
});
3349+
});

0 commit comments

Comments
 (0)