Select Data Date Attribute Value with jQuery

By August 1, 2017 May 23rd, 2018 No Comments

How can I just select the value of the data-date attribute.

I need to get 2016-02-14 into a jQuery variable.

<td class="fc-day fc-widget-content fc-sun fc-past" data-date="2016-02-14">

You can select it with jQuery using:

$( "td" ).attr( "data-date" )

Demo here

Leave a Reply