我在 Post Grid 中的自定义字段中添加了一个类(格式日期),但我似乎无法对其应用任何 JS。
<div class="vc_gitem-post-meta-field-_EventStartDate format-date vc_gitem-align-left"> 2015-10-08 07:30:00</div>
简单的 jQuery 测试:
$('.format-date').addClass('test')
代码在页脚中,我已经尝试过$(window).load(function() $(document).ready(function()
。Fire Bug中没有JS错误。
我怀疑这是由于应用于帖子的加载动画造成的。加载后如何调用我的 JS?
最佳答案
这有效:
$(document).ajaxStop(function() {
// your code here
});
关于javascript - 为 WordPress WPBakery Visual Composer Post Grid 调用 JavaScript 自定义添加类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32617790/