THE WHYTELEAFE FC SUPPORTERS' DISCUSSION FORUM

WHYTELEAFE FC HOMEPAGE | WHYTELEAFE FC FACEBOOK PAGE | WHYTELEAFE FC TWITTER

NOTE: All postings from persons calling themselves "Anonymous", "anon" or similar will be deleted

Return to front page

Newest article: Re: Work by TauregYesterday 14:37Yesterday at 14:37:58view thread

Oldest article: New grounds 2014/15 by Lee Farmie22/5/2014 12:36Thu May 22 12:36:46 2014view thread

MenuSearch

Next thread: Roof heat proofing: by zeeshan26/10 11:27Tue Oct 26 11:27:31 2021view thread

Return the data-football attribute name

By Mary14/10 05:08Thu Oct 14 05:08:20 2021

Views: 41

If I have the following piece of code:


How would I get the name of the data tag, so in this case it would be 'data-football'. I know how I would get the value but would like to know how I can get the name of the data-tag - in this case data-football when the button is pressed.

i.e,

$(document).on("click", "button", function(){
// Get the name of the attribute (data-football - not the value);
});
Thanks.

PrepaidCardStatus

reply to this article | return to the front page

Next article in this thread: Re: Return the data-football attribute name by YolandaQuitzon26/10 08:28Tue Oct 26 08:28:15 2021

Previous thread: Infrastructure facilities by Josh M. Cavazos24/10 19:36Sun Oct 24 19:36:34 2021view thread

Follow us on Twitter @WhyteleafeFC. Visit the Twitter page for the full picture.