On Jul 18, 1:09 pm, zlich <[EMAIL PROTECTED]> wrote:
> i figured it out

Not very well.

> $('#example').tabs({
>     select: function(ui) {
>            if($.browser.msie)

 // For all browsers that support IE's innerText
 if (typeof ui.tab.innerText == 'string') {

>                alert(ui.tab.innerText);
>            else
>               alert(ui.tab.text);

 // For others that support the W3C's textContent
 } else if (typeof ui.tab.textContent == 'string') {
   alert( ui.tab.textContent )

 // And those that doen't support either but have innerHTML
 } else if (typeof ui.tab.innerHTML == 'string') {
   alert(ui.tab.innerHTML.replace(/(<\w+)([^>)]*)(>)/g, '')
 }

The innerHTML one is flakey if the content includes < or >
characters.  As an alternative, you can also do recursion over the
decendants and concatenate the values of all the text nodes (and at
the same time ignore script elements).

>    }});
>
> for IE it;s ui.tab.innerText and for FF it is ui.tab.text

And for all the other browsers?


--
Rob

Reply via email to