javascript - define the area clickable to move a div -


okay wondering how make can move div using child tag eg image. http://jsfiddle.net/code_cookies/5e75n/

$(".drag").draggable({ containment: "#draggable"}); 

in example made can move box clicking on @ point , wondering if restrict have click image move parent div?

thanks in advance

sure, add handle: "img"

jsfiddle example

$(".drag").draggable({     containment: "#draggable",     handle: "img"  }); 

see: http://api.jqueryui.com/draggable/#option-handle


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -