Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double caption in cardtable #41

Open
info-gmbh opened this issue Aug 17, 2016 · 1 comment
Open

Double caption in cardtable #41

info-gmbh opened this issue Aug 17, 2016 · 1 comment

Comments

@info-gmbh
Copy link

Having defined a table with an caption results in a double caption

<table>
   <caption>my caption</caption>
   <thead>
      <tr>
         <th>aa</th>
         <th>bb</th>
         <th>cc</th>
     </tr>
   </thead>
   <tbody>
     ...
   </tbody>
</table>

Analyzing the result HTML after initializing the cardtable shows that the caption markup is inserted in the div, and not in the table that is hidden. So the caption is visible twice.

After changing your code at the end of the cardtable function it is working like a charm.

BEFORE CHANGE:

$stacktable.prepend($caption);
$stacktable.append($(markup));
$table.before($stacktable);

AFTER CHANGE:

$stacktable.append($(markup));
$stacktable.find('table').prepend($caption);
$table.before($stacktable);

The changes are:

  • flip the first two rows
  • prepend caption in table, not in div

Maybe you can put that the next rollout ;)

Tanks

@DYNAMYA
Copy link

DYNAMYA commented Aug 22, 2016

confirm that error and the solution 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants