jQuery AJAX html5
06.09.2010. u 22:57 · pre 196 meseci
#1
Ovo sam radio i je radilo ali sa xhtml. Sad radim sa html5 i mi ne radi.
O cemu se radi?
http://www.bigfatsparrow.com (radi samo ACTO link sa leve strane)
Evo spornog koda
Znaci, na klik na link, ucitavam stranu http://www.bigfatsparrow.com/pages/akto-1.html
Ali response dobijem kao string, ne kao objekt, i $(response).find('#image') ne radi.
Ovu fintu sam koristio na drugo mesto, ali kao sto kazem, sa xhtml, i radi perfektno.
Any hint?
O cemu se radi?
http://www.bigfatsparrow.com (radi samo ACTO link sa leve strane)
Evo spornog koda
Code:
$('nav#sub ul li a').click(function() {
$.get(this.href, function(response) {
var img = $(response).find('#image');
console.log(img);
var description;
var colorScheme;
$('#image img').attr('src', img);
});
return false;
});
$('nav#sub ul li a').click(function() {
$.get(this.href, function(response) {
var img = $(response).find('#image');
console.log(img);
var description;
var colorScheme;
$('#image img').attr('src', img);
});
return false;
});
Znaci, na klik na link, ucitavam stranu http://www.bigfatsparrow.com/pages/akto-1.html
Ali response dobijem kao string, ne kao objekt, i $(response).find('#image') ne radi.
Ovu fintu sam koristio na drugo mesto, ali kao sto kazem, sa xhtml, i radi perfektno.
Any hint?
Potpis
routing protocols enable routers to route routed protocols!