我正在尝试在 joomla 中创建一个模块,它使用一个 jquery 插件。单击模块中的元素时,我必须执行 ajax 操作。目前我正在指定 php 文件的整个路径。但我知道这是一种错误的方法。
jquery插件中的代码是这样的。(请注意jquery插件文件中指定路径的第二行)
$.get(
"/subdirectory/MyBlog/modules/mod_calendar/getCalendar.php", {
month: $("#selectedMonth").val(),
year: $("#selectedYear").val(),
flag: '-1'
}, function(data){
$("#monthlyCalendar").html(data);
$("#monthlyCalendar").show();
}
);
在 jquery 插件文件中指定路径的正确方法是什么。我还需要知道将我的 jquery 插件文件放在模块中的什么位置。