This question is locked. New answers and comments are not allowed.
Hi
I am adding tabs client-side. However, i do not want to create duplicate tabs.
Is there a simple way of detecting if a tab already exists in the tabstrip ?
I have tried to iterate through each tab, but can not figure out how to get text of tab... (see code below)
I pass newTextValue into function but my attributes dont seem to be correct for the matching process...
Any ideas please?
Thanks
Mark
I am adding tabs client-side. However, i do not want to create duplicate tabs.
Is there a simple way of detecting if a tab already exists in the tabstrip ?
I have tried to iterate through each tab, but can not figure out how to get text of tab... (see code below)
var
textValue;
var
index;
var
exists =
false
;
$(
'#SampleTabStrip a'
).each(
function
() {
textValue= $.data(
this
,
'tTabStrip'
);
if
(textValue== newTextValue) { exists =
true
; index = $(
this
).attr(
'text'
); }
})
Any ideas please?
Thanks
Mark