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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -