Extending Buttons: attr tag does nothing

Extending Buttons: attr tag does nothing

lymanjohnsonlymanjohnson Posts: 1Questions: 1Answers: 0

I have plenty of buttons in my table that work. Lots of them extend existing functions and work totally as expected. I have all the right plugins.

However, when I try to use this example:

    {
        extend: 'copyHtml5',
        attr:  {
            title: 'Copy',
            id: 'copyButton'
        }
    }

Nothing that I put inside the attr brackets matters at all. The title is ALWAYS "Copy" and the id is always absent, regardless of what I make the title and id, or whether I omit the attr section entirely.

I'm tearing my hair out over here trying to figure out why this one thing isn't working. I pasted it in straight from the website, and everything else about it works!

Answers

  • kthorngrenkthorngren Posts: 21,673Questions: 26Answers: 5,018

    Looks like it works here:
    http://live.datatables.net/folayani/1/edit

    I see this when inspecting the button:

    <button class="dt-button buttons-copy buttons-html5" tabindex="0" aria-controls="example" type="button" title="Copy Me" id="copyButton"><span>Copy</span></button>
    

    When I hover over the button I see "Copy Me". Is this what you are expecting?

    Kevin

This discussion has been closed.