From 5ea903d8a616d3506f4e88393ad96607582cbb39 Mon Sep 17 00:00:00 2001 From: Ahmad Abdel-Yaman Date: Tue, 16 Feb 2016 17:15:19 +0200 Subject: [PATCH] Escape '#' in tab selector --- js/foundation/foundation.tab.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/foundation/foundation.tab.js b/js/foundation/foundation.tab.js index fb0f17225..cfb064f07 100644 --- a/js/foundation/foundation.tab.js +++ b/js/foundation/foundation.tab.js @@ -102,19 +102,19 @@ var hash_element = S(hash); 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()); + self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\\' + hash + ']').parent()); } else { // Not the tab content div. If inside the tab content, find the // containing tab and toggle it as active. var hash_tab_container_id = hash_element.closest('.content').attr('id'); if (hash_tab_container_id != undefined) { - self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash); + self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\\#' + hash_tab_container_id + ']').parent(), hash); } } } else { // Reference the default tab hashes which were initialized in the init function 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()); + self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=\\' + self.default_tab_hashes[ind] + ']').parent()); } } } -- 2.47.2