Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get EventData's Title Value #83

Open
kuswantoheng opened this issue Mar 26, 2020 · 1 comment
Open

Get EventData's Title Value #83

kuswantoheng opened this issue Mar 26, 2020 · 1 comment

Comments

@kuswantoheng
Copy link

kuswantoheng commented Mar 26, 2020

Hi All,

I have the following script:

`<script type="application/javascript">
var eventData = [
{"date":"2015-01-01","badge":false,"title":"Example 1"},
{"date":"2015-01-02","badge":true,"title":"Example 2"}
];
$(document).ready(function () {
$("#my-calendar").zabuto_calendar({
data: eventData,
action: function () {
return myDateFunction(this.id);
}
});
});

function myDateFunction(id) {
var date = $("#" + id).data("date");
var hasEvent = $("#" + id).data("hasEvent");

// HOW TO GET VALUE OF "TITLE", ETC "EXAMPLE 1"

}
</script>`

My question is, how do we get the "title" value as we can obtain the value of "date" and "hasEvent"?

@kuswantoheng
Copy link
Author

I have tried but failed:

var title = $("#" + id).data("title");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant