Hello. I''ve been experimenting with the dynamic html layer effect from
script.aculo.us and I was hoping I might find some help. (if the is the
wrong place to discuss this or if you have no idea what I am talking
about I apologize
To begin, I have two layers, layer1 and layer2. Layer1 has been given
a dragable property, (layer2 can be dragable or stationary)
When layer1 is dragged, and dropped over top layer2, I want layer1 to
hide.
Current code:
-----------------------------------------------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"
/>
<title>Drag and Drop</title>
<script src="prototype.js"
type="text/javascript"></script>
<script src="scriptaculous.js"
type="text/javascript"></script>
<script type="text/javascript"
src="dragdrop.js"></script>
<style type="text/css">
<!--
.icon {}
#Layer1 {position:absolute; width:100px; height:100px; z-index:3;
background-color: #00FF00;}
#Layer2 {position:absolute; width:200px; height:200px; z-index:2; left:
172px; background-color: #9900FF;}
-->
</style>
</head>
<body>
<div class="icon" id="Layer1"></div>
<div id="Layer2"></div>
<p>
<script type="text/javascript" language="javascript"
charset="utf-8">
// <![CDATA[
new Draggable(''Layer1'', {} );
Droppables.add(''Layer2'',{accept:[''icon''],onDrop:function(){}});
// ]]>
</script>
</body>
</html>
-----------------------------------------------------------------------------------------------------------
While I managed to effectively enable layer1 to be dragabal I have been
unsuccessful in finding the proper code to hide layer1 when it id
dropped on layer 2
If any one has any thoughts they would me immensely appreciated
404notfound
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---