jquery: vertically expand div when using contained draggable
Question by monsto
I’ve got paragraphs of plain text with specific words hilited. the hilited words are meant to be draggable. when dragging is started, i want the div that hilites the word (#hilite) to expand top and bottom extents (vertically only), in a higher z-order, and allow the word (#word) to be dragged up and down in that space (container: parent). The plans is at some point have it dropped on a droppable within the area.
at this point, my problem is that i expand #hilite with padding… which increases the size of the div without increasing usable space. Would using Resizable be better? or Animate? I’ve seen a number of recommendations for using Resizable, but i thought it was for user resizing not programmatic.
for the droppables, i figure that once the space is created i’ll swap out .css(‘display’, ‘[none|block]’) to show them inside the #hilite div and make them valid targets.
http://jsfiddle.net/monsto/GCsnM/ for what i have atm.
(oh btw, i hate the people came up with jsfiddle. it’s simply too genius.)