jquery - How to make a selection in two parts -


i'm looking correct syntax make "double selection" in jquery. tried following code doesn't work :

$('#list li').last().$('img').attr({ src : dataurl, alt : file.name }); 

i error :

 error: typeerror: $(...).last(...).$ not function 

how can fix this? thanks

$('#list li').last().find('img').attr({ src : dataurl, alt : file.name }); 

?

it select images inside last li

the same bit more compact:

$('img', '#list li:last') 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -