I have this function within my <script>
tags:
$('.btn').click(function()
{
var data = {
title: "This is a title"
};
Craft.postActionRequest('plugin/controller/action', data, function(response) {
});
});
The "Craft" function returns as "TypeError: Craft is undefined". I'm guessing I somehow need to reference the scope to the function but I can't seem to get it to work.
I tried adding _self = this
outside my jquery click function and reference Craft like "_self.Craft" but that didn't do it.
What am I missing here?