jquery Tab group IDs

Posted by mare on Stack Overflow See other posts from Stack Overflow or by mare
Published on 2010-04-29T12:41:44Z Indexed on 2010/04/29 12:47 UTC
Read the original article Hit count: 401

Filed under:
|

I'm having an issue with jQuery UI Tabs script which does not pick up tabs that have a dot "." in their name (ID).

For instance like this:

<script type="text/javascript">
    $(function () {
        $("#tabgroup\\.services").tabs();
    });
</script>

<div id="tabgroup.Services">
    <ul>

        <li><a href="#tab.service1">
            Service 1 title</a></li>

        <li><a href="#tab.service2">
            Service 2 title</a></li>

    </ul>

<div id="tab.service1">
    <p>content</p>
</div>

<div id="tab.service2">
    <p>content</p>
</div>

</div>

The problem is because to select an element with a dot in its name, you need to use escapes (like when I initialize the tabs on my tabgroup). And apparently the Tabs JS implementation does not do that. Although I can do it at the tab group level, I cannot do it lower down because that's implemented in the Tabs JS file and I would not want to modify it (if possible).

© Stack Overflow or respective owner

Related posts about jquery-ui

Related posts about jquery-ui-tabs