javascript - jquery resizable() not working (with example) -
please see work in progress:
http://rawgit.com/jfix/cover-image-position/master/index.html
my goal allow drag , drop desktop onto page, , following drag image around resize it. should able drop image onto page , drag around.
however, what doesn't work resizing of image. there no handle displayed @ frame around image , it's impossible resize it. no errors in console.
the relevant code here:
hdl.resizable({ aspectratio: true, autohide: true, alsoresize: "#coverimage", handles: 'all', resize: function(event, ui) { cvr .css('left', ui.position.left) .css('top', ui.position.top); } });
where hdl
short form $('#handler')
in assets/script.js
file. should note has been copied verbatim jsfiddle: http://jsfiddle.net/nl5ew/ works fine, obviously.
i can't seem find problem code. thank eagle-eyed insights may have.
having inspected @rrr's jsfiddle, , comparing line line code, ended discovering not including one, turns out, vital css file jquery ui suite. line missing:
<link rel="stylesheet" type="text/css" href="//code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
in fairness correct solution provided @rrr, unfortunately not in full-blown answer in comment.
Comments
Post a Comment