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
Post a Comment