I''m working on a site that has two containers of floated sortable
divs, along with a stationary ad on the right side of my page. I can
drag/drop/sort the divs between containers. But under certain sort
combinations, I end up with a big hole in the center of my layout.
FWIW, I also tried this with a single container, including the ad div
in the float list but locking it down with the use of only: In this
case, the ad was not draggable, but it ended up moving positions
anyway when things were sorted around it.
Anyone have any suggestions?
Here''s the prototype/scriptalicious code:
<script type="text/javascript" language="javascript">
Sortable.create(''container'',
{onUpdate:updateSort,only:''module'',ghosting:true,containment:
[''container'', ''container1''],
constraint:false,tag:''div'',
handle:''handle'', hoverclass:''dropmarker''});
Sortable.create(''container1'',
{onUpdate:updateSort,only:''module'',ghosting:true,containment:
[''container'',
''container1''],constraint:false,tag:''div'',
handle:''handle'', hoverclass:''dropmarker''});
var sorts = Sortable.serialize(''container'');
</script>
And the css:
div.module{
width:305px;
height:290px;
float:left;
border:1px solid #999;
margin:3px;
padding:0px;
}
div.ad_module{
width:305px;
height:290px;
border:1px solid #999;
margin:3px;
padding:0px;
float:left;
}
.module p{
margin:2px 0 2px 0 ;
}
#container{
width:630px;
float:left;
}
#container1{
width:1075px;
}
.dropmarker {
border-left: 2px dashed #666;
border-top: 2px dashed #666;
border-bottom: 2px dashed #666;
border-right: 2px dashed #666;
width:305px;
height:290px;
z-index:1000;
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---