Javascript jQuery-如何在引号中围绕Ajax加载的元素?

Javascript jQuery-如何在引号中围绕Ajax加载的元素?,javascript,jquery,html,ajax,Javascript,Jquery,Html,Ajax,我有一份推荐信。通过ajax.load()方法从同一站点上的另一个页面获取推荐。我试图用引文来包装即将到来的推荐信。(例:这是一份证明,应该是“这是一份证明”)。但是,我的代码不起作用 这是用于添加报价的函数: function quotations(){ $(this).prepend('"').append('"'); }; 这里是ajax函数(从/?page=testicials&gridID=1.cfgThemeGridGenericContent加载推荐): html结构如下所示:

我有一份推荐信。通过ajax.load()方法从同一站点上的另一个页面获取推荐。我试图用引文来包装即将到来的推荐信。(例:这是一份证明,应该是“这是一份证明”)。但是,我的代码不起作用

这是用于添加报价的函数:

function quotations(){
$(this).prepend('"').append('"');
};
这里是ajax函数(从/?page=testicials&gridID=1.cfgThemeGridGenericContent加载推荐):

html结构如下所示:

<div class="slides" id="slide1">
This is the testimonial text.
</div>

这是推荐书。
您看到的shorten()函数只不过是一个确保推荐信不会太长的函数。我已经证实它是有效的。如果我需要添加,请告诉我

为什么我的推荐信没有用引文包装?

只需使用css:

div.slides::before,
div.slides::after {
    content: '"';
}
至于“为什么它不起作用”,我怀疑这可能取决于
quotes()
函数中的
$(this)
是什么

div.slides::before,
div.slides::after {
    content: '"';
}