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

jquery - Invalid Assignment Left-Hand Side -

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

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -