Reputation: 128
function getTabContent(tabId){
var c = tabbar._content.tabId.innerHTML;
return c;
}
I want var c to evaluate to the passed in var. So if I call getTabContent('dash'). var c will be the value of tabbar._content.dash.innerHTML from the DOM. NOT the string tabbar._content.dash.innerHTML.
How do I do this?
Upvotes: 1
Views: 54
Reputation: 359846
function getTabContent(tabId){
return tabbar._content[tabId].innerHTML;
}
Upvotes: 5