Loading ...
Sorry, an error occurred while loading the content.

Drag around scrollable Divs

Expand Messages
  • lgk527
    Hi! I want to drag and drop small DIV elements from one scrollable DIV area into another one. Here is the code I got: dd = new YAHOO.util.DD( Div1 ); dd =
    Message 1 of 4 , Apr 23, 2007
    • 0 Attachment
      Hi!

      I want to drag and drop small DIV elements from one "scrollable DIV
      area" into another one.

      Here is the code I got:

      dd = new YAHOO.util.DD("Div1");
      dd = new YAHOO.util.DD("Div2");

      //area1 is one drag zone, i want the elements be dragged out of here
      <div id="area1" style="border-style: solid; border-width: 1px;
      overflow: scroll; height: 100px; width: 100px; ">
      <div id="Div1" style="background:Black; height:20px;
      width:20px;"></div>
      <div id="Div2" style="background:Green; height:20px;
      width:20px;"></div>
      </div>

      Using Firefox I can`t drag Div1 or Div2 out of area1. How can I do
      (fix) that?

      Help is very appreciated

      Thanks
    • wizfrob
      ... Have a look at the Scrollable List demo for an example of how to do this.
      Message 2 of 4 , Apr 25, 2007
      • 0 Attachment
        --- In ydn-javascript@yahoogroups.com, "lgk527" <lgk527@...> wrote:
        >
        > I want to drag and drop small DIV elements from one "scrollable DIV
        > area" into another one.

        Have a look at the Scrollable List demo for an example of how to do this.
      • lgk527
        ... this. ... I found the sortable list example. Did you mean this one? If yes, I don t see any scrollable DIVs areas here. If no, can you lead me where to
        Message 3 of 4 , Apr 26, 2007
        • 0 Attachment
          --- In ydn-javascript@yahoogroups.com, "wizfrob" <brian@...> wrote:
          >
          > --- In ydn-javascript@yahoogroups.com, "lgk527" <lgk527@> wrote:
          > >
          > > I want to drag and drop small DIV elements from one "scrollable DIV
          > > area" into another one.
          >
          > Have a look at the Scrollable List demo for an example of how to do
          this.
          >

          I found the "sortable list" example. Did you mean this one? If yes, I
          don't see any scrollable DIVs areas here. If no, can you lead me where
          to find your mentioned sample?

          Thanks...
        • wizfrob
          ... Whups - yeah, I meant the Sortable List example. All you need to do to make the divs scrollable is to set the overflow: scroll style on them.
          Message 4 of 4 , May 1, 2007
          • 0 Attachment
            --- In ydn-javascript@yahoogroups.com, "lgk527" <lgk527@...> wrote:
            >
            > I found the "sortable list" example. Did you mean this one? If yes, I
            > don't see any scrollable DIVs areas here. If no, can you lead me where
            > to find your mentioned sample?

            Whups - yeah, I meant the Sortable List example.

            All you need to do to make the divs scrollable is to set the
            "overflow: scroll" style on them.
          Your message has been successfully submitted and would be delivered to recipients shortly.