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: Gambling is way to earn money by Dinew1927Yesterday 23:46Yesterday at 23:46:33view thread

Oldest article: Opening hours by WFC2/12/2014 17:09Tue Dec 2 17:09:32 2014view thread

MenuSearch

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

Return the data-football attribute name

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

Views: 101

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/2021 08:28Tue Oct 26 08:28:15 2021

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

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