Menu icon Foundation

Developer

My Posts

No Content

My Comments

Teague Camarigg commented on James Craine's post over 2 years

For those who have not updated to F6 this may help as well.
We use jquery v220 and experienced this error when deep linking:
Uncaught Error: Syntax error, unrecognized expression: [data-tab] > * > a[href=#report]
 
We learned it was because jquery needed to interpret the # as a literal in order to work with the foundation code.
 
After testing a few things, here is our modification that fixed it (Foundation v5.5.3):
Go to foundation.tab.js
On lines 105,111,117 make the corresponding changes:
Simply add the literal slashes before the hash value for the href
 
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
// Tab content div
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + hash + ']').parent());
}

if (hash_tab_container_id != undefined) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\#' + hash_tab_container_id + ']').parent(), hash);
}

for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + self.default_tab_hashes[ind] + ']').parent());
}
 
This worked for us, your context may be different but it is simple enough to try.

Teague Camarigg commented on Lannie Le's post over 2 years

For those who have not updated to F6 this may help as well.
We use jquery v220 and experienced this error when deep linking:
Uncaught Error: Syntax error, unrecognized expression: [data-tab] > * > a[href=#report]
 
We learned it was because jquery needed to interpret the # as a literal in order to work with the foundation code.
 
After testing a few things, here is our modification that fixed it (Foundation v5.5.3):
Go to foundation.tab.js
On lines 105,111,117 make the corresponding changes:
Simply add the literal slashes before the hash value for the href
 
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
// Tab content div
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + hash + ']').parent());
}

if (hash_tab_container_id != undefined) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\#' + hash_tab_container_id + ']').parent(), hash);
}

for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + self.default_tab_hashes[ind] + ']').parent());
}
 
This worked for us, your context may be different but it is simple enough to try.

Posts Followed



Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on James Craine's post over 2 years

For those who have not updated to F6 this may help as well.
We use jquery v220 and experienced this error when deep linking:
Uncaught Error: Syntax error, unrecognized expression: [data-tab] > * > a[href=#report]
 
We learned it was because jquery needed to interpret the # as a literal in order to work with the foundation code.
 
After testing a few things, here is our modification that fixed it (Foundation v5.5.3):
Go to foundation.tab.js
On lines 105,111,117 make the corresponding changes:
Simply add the literal slashes before the hash value for the href
 
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
// Tab content div
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + hash + ']').parent());
}

if (hash_tab_container_id != undefined) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\#' + hash_tab_container_id + ']').parent(), hash);
}

for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + self.default_tab_hashes[ind] + ']').parent());
}
 
This worked for us, your context may be different but it is simple enough to try.

You commented on Lannie Le's post over 2 years

For those who have not updated to F6 this may help as well.
We use jquery v220 and experienced this error when deep linking:
Uncaught Error: Syntax error, unrecognized expression: [data-tab] > * > a[href=#report]
 
We learned it was because jquery needed to interpret the # as a literal in order to work with the foundation code.
 
After testing a few things, here is our modification that fixed it (Foundation v5.5.3):
Go to foundation.tab.js
On lines 105,111,117 make the corresponding changes:
Simply add the literal slashes before the hash value for the href
 
if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
// Tab content div
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + hash + ']').parent());
}

if (hash_tab_container_id != undefined) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\#' + hash_tab_container_id + ']').parent(), hash);
}

for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\' + self.default_tab_hashes[ind] + ']').parent());
}
 
This worked for us, your context may be different but it is simple enough to try.

Posts Followed

Following

  • No Content

Followers

  • No Content