jquery:.load() 之后不应用移动样式
$('#quest').click(function() {
$('#replaceit').load('class/cars.php?q=true',function(){$('#replaceit').collapsible('refresh');});
“在初始化之前无法调用可折叠上的方法;尝试调用方法‘刷新’”
生成的 Html 代码似乎工作正常,例如:
<div data-collapsed="true" data-role="collapsible">
<h1>Which warranty policy of the following is the best for you?</h1>
<p><input type="checkbox" value="2yearsunlimittedkilometers" name="question[Warranty][]">2 years unlimitted kilometers
<input type="checkbox" value="3yearsor60000kilometers" name="question[Warranty][]">3 years or 60000 kilometers
</p></div>
但它的样式尚未设计为可折叠:(.. 有任何线索吗?
$('#quest').click(function() {
$('#replaceit').load('class/cars.php?q=true',function(){$('#replaceit').collapsible('refresh');});
"cannot call methods on collapsible prior to initialization; attempted to call method 'refresh'"
Html code that is generated seems to be working fine eg:
<div data-collapsed="true" data-role="collapsible">
<h1>Which warranty policy of the following is the best for you?</h1>
<p><input type="checkbox" value="2yearsunlimittedkilometers" name="question[Warranty][]">2 years unlimitted kilometers
<input type="checkbox" value="3yearsor60000kilometers" name="question[Warranty][]">3 years or 60000 kilometers
</p></div>
but yet its not styled into collapsable :(.. any clue ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来你在函数调用中缺少一些右括号
你有这个:
看起来应该是这样:
而且我从来没有见过这个:
你能提供它的文档/示例吗?
也许可以尝试:
HTML 标记的替代语法:实时示例: http://jsfiddle.net/Rj6AW/4/< /a>
Looks like you're missing some closing brackets in the function call
You have this:
Looks like it should be this:
Also I'v never seen this:
Could you provide documentation/examples of it?
Maybe try:
Alternative Syntax for your HTML markup: Live Example: http://jsfiddle.net/Rj6AW/4/