0

Possible Duplicate:
Error changing html content with jQuery

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>');
});

http://jsfiddle.net/Txyse/

My solution so far is:

$('#foo2').load("content1.html");

Another solution?

4

1 回答 1

1

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>");
});
于 2013-01-14T07:33:47.553 回答