css - jquery draggable li with image inside -


i'm dynamically creating li draggable elements. works ok want dynamically insert image inside li's , able o still drag , drop them.
here working code:

    for( = 1; <= num; i++) {            $("#sortable").append("<li class='ui-state-default' id=" + + ">" + "no" + + "</li>");          }   

how can this?
maybe inline css , background-image style?

yes dynamically assign class background-image li. have know size of images.

but why not add image?

$('li#idofyourli').html('<img src="pathtoyourimg" />') 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -