jQuery UI showing tabs as list

I am using jQuery UI along with WordPress to display tabbed forms. The jQuery seems to be adding the tabs markup correct.

<div id="tabs">
      <ul>
        <li><a href="/community_users_form/profile_edit/<?php echo $cid.'/'.$userid?>">Profile</a></li>
        <li><a href="#tabs-2">Communities</a></li>
        <li><a href="/community_users_form/roles_edit/<?php echo $cid.'/'.$userid?>">Roles</a></li>
        <li><a href="#tabs-4">Admin</a></li>
        <li><a href="#tabs-5">Delegation</a></li>
        <li><a href="#tabs-6">Payments</a></li>
        <li><a href="#tabs-7">Email</a></li>
        <li><a href="#tabs-8">Activity</a></li>
      </ul>

Changes to

Read More
<div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
      <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" role="tablist">
        <li class="ui-state-default ui-corner-top ui-tabs-active ui-state-active" role="tab" tabindex="0" aria-controls="ui-id-2" aria-labelledby="ui-id-1" aria-selected="true" aria-expanded="true"><a href="/community_users_form/profile_edit/2568/" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-1">Profile</a></li>
        <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-2" aria-labelledby="ui-id-3" aria-selected="false" aria-expanded="false"><a href="#tabs-2" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-3">Communities</a></li>
        <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="ui-id-5" aria-labelledby="ui-id-4" aria-selected="false" aria-expanded="false"><a href="/community_users_form/roles_edit/2568/" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-4">Roles</a></li>
        <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-4" aria-labelledby="ui-id-6" aria-selected="false" aria-expanded="false"><a href="#tabs-4" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-6">Admin</a></li>
        <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-5" aria-labelledby="ui-id-7" aria-selected="false" aria-expanded="false"><a href="#tabs-5" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-7">Delegation</a></li>
        <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-6" aria-labelledby="ui-id-8" aria-selected="false" aria-expanded="false"><a href="#tabs-6" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-8">Payments</a></li>
        <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-7" aria-labelledby="ui-id-9" aria-selected="false" aria-expanded="false"><a href="#tabs-7" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-9">Email</a></li>
        <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-8" aria-labelledby="ui-id-10" aria-selected="false" aria-expanded="false"><a href="#tabs-8" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-10">Activity</a></li>
      </ul>

The tabs appear as a normal list and not tabs.

List view

Related posts

2 comments

  1. fiddle link

                 <div id="tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
                          <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" role="tablist">
                            <li class="ui-state-default ui-corner-top ui-tabs-active ui-state-active" role="tab" tabindex="0" aria-controls="ui-id-2" aria-labelledby="ui-id-1" aria-selected="true" aria-expanded="true"><a href="/community_users_form/profile_edit/2568/" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-1">Profile</a></li>
                            <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-2" aria-labelledby="ui-id-3" aria-selected="false" aria-expanded="false"><a href="#tabs-2" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-3">Communities</a></li>
                            <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="ui-id-5" aria-labelledby="ui-id-4" aria-selected="false" aria-expanded="false"><a href="/community_users_form/roles_edit/2568/" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-4">Roles</a></li>
                            <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-4" aria-labelledby="ui-id-6" aria-selected="false" aria-expanded="false"><a href="#tabs-4" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-6">Admin</a></li>
                            <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-5" aria-labelledby="ui-id-7" aria-selected="false" aria-expanded="false"><a href="#tabs-5" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-7">Delegation</a></li>
                            <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-6" aria-labelledby="ui-id-8" aria-selected="false" aria-expanded="false"><a href="#tabs-6" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-8">Payments</a></li>
                            <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-7" aria-labelledby="ui-id-9" aria-selected="false" aria-expanded="false"><a href="#tabs-7" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-9">Email</a></li>
                            <li class="ui-state-default ui-corner-top" role="tab" tabindex="-1" aria-controls="tabs-8" aria-labelledby="ui-id-10" aria-selected="false" aria-expanded="false"><a href="#tabs-8" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-10">Activity</a></li>
                          </ul>
    
                    <script>
                          $(function() {
                            $( "#tabs" ).tabs();
                          });
                    </script>
    
  2. Found the problem. I was including jquery-ui.theme.css and not jquery-ui.css

Comments are closed.