Skip to content
Snippets Groups Projects
Commit ba905691 authored by Jared Hancock's avatar Jared Hancock
Browse files

tips: Allow tips in several namespaces on one page

parent 50150134
No related branches found
No related tags found
No related merge requests found
......@@ -53,8 +53,9 @@ jQuery(function() {
},
getHelpTips = (function() {
var dfd, cache = {};
return function(namespace) {
var namespace = namespace
return function(elem) {
var namespace =
$(elem).closest('[data-tip-namespace]').data('tipNamespace')
|| $('#content').data('tipNamespace')
|| $('meta[name=tip-namespace]').attr('content');
if (!namespace)
......@@ -147,7 +148,7 @@ jQuery(function() {
clearTimeout(tip_timer);
});
getHelpTips().then(function(tips) {
getHelpTips(elem).then(function(tips) {
var href = elem.attr('href');
if (href) {
section = tips[elem.attr('href').substr(1)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment