Well, thanks for looking over this guys, but in doing some further research I found out about the appendTo
property of draggable (courtesy of this SO: Jquery draggable: scrolling in droppable using helper 'clone' and appendTo) , and now everything works. I can simply append my draggable helper to a different div that is visibly on top of my drag zone. Here is my modified draggable
code. This also includes an addition which prevents the scrollbar from jumping back to the top when a row after the 2nd row is dragged:
jQuery(".galleryTile").draggable({revert: true,
helper: "clone",
appendTo:'#templateEditorContainer', //apend it to another div!!
start: function(e, ui)
{
$(ui.helper).addClass("ui-draggable-helper");
latestScroll=$('#gallery').scrollTop(); //keep track of
//where the scrollbar was
},
drag: function() {
jQuery('.galleryTile').css('z-index', '0');
jQuery('.ui-draggable-helper').css('z-index', '1000');
jQuery(this).css('z-index', '1000');
$('#gallery').scrollTop(latestScroll); //revert the scrollbar to the
//correct position instead
// of the top
},
stop: function() {
jQuery(this).css('z-index', '0');
jQuery('.ui-draggable-helper').removeClass('ui-draggable-helper');
}
});
jQuery(".galleryTile").mousedown(prepTileForDragging);