HTML jQuery的错误代码 [英] error code with html jQuery
本文介绍了HTML jQuery的错误代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
使用jQuery更改html内容时出错
Possible Duplicate:
Error changing html content with jQuery
这是怎么了?我想用其他内容替换ul内容.
What is wrong here? I want replace ul content with other content.
$('#carouselselectitem1').click(function() {
$('#foo2').html('<li><div id="lines"></div><div id="tittle">2 PROGRAMEO, LONDRES</div><div id="image"></div><div id="text">LOREM IPSUM XHTML+CSS3 HTTP://WWW.url.com/</div></li>');
});
到目前为止,我的解决方案是:
My solution so far is:
$('#foo2').load("content1.html");
另一种解决方案?
推荐答案
使用小提琴左侧面板中的jQuery框架,然后尝试以下代码:
Use jQuery framework from left panel of the fiddle then try this code:
$('#carouselselectitem1').click(function() {
$('#foo2').html("<li><div id='lines'></div><div id='tittle'>TITTLE2</div><div id='image'></div><div id='text'>TEXT2</div></li>");
});
这篇关于HTML jQuery的错误代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文