1

I ran google multiple times but the answer remains unclear.

i pass data trough data-id in html. this contains a timestamp like this one "2015-11-01" when i console.log this in jquery the value is empty.

Help much appreciated

Code:

data-timeIndacation="<?php echo $time1; ?>" in html / php

Code:

var timeIndacation = $("#CanavaslineChartData").data("timeIndacation"); console.log(timeIndacation);

Output:

undefined

1 Answers1

1

data attribute must be in lowercase. Try with -

data-timeindacation
Sougata Bose
  • 31,517
  • 8
  • 49
  • 87