It’s easy to make something draggable, slightly less easy to make it appear and then be draggable. Draw an HTML layer (CSS Layout button on) on your page. Note what Freeway has called it (the Title field in the Inspector). Apply the Protaculous Action to the page, choose scriptaculous-packed from the library picker in the Actions palette, then click on either of the Function Body buttons. Enter something like this: new Draggable('item1',{}); That’s assuming that your DIV is called item1 in Freeway, so change that to whatever it’s really called in your layout. Publish and preview in a browser. You should be able to drag the div around the screen. In your styles palette, create a new style called drag. The only thing you need to add to it is the cursor property, so you do that with the Extended button. Click New, then in Name, enter ‘cursor’, in Value, enter ‘move’. Click on the child box that you want to drag with, and while it is selected, click on your drag style from the Styles list. At this point, if you were to preview, whenever your mouse is over the handle, it will change into the Move cursor (arrows pointing like a compass rose). Now, go back to your Draggable. Note the Title of the main box (parent of the handle), and enter this in the Protaculous Action code block: new Draggable('item1',{handle:'drag'}); Now preview in a browser. In addition to the cursor change noted above, you will find that you can only drag the box by its handle. Nothing else will register. |
||
Click here to move me