# How to implement click and drag feature in Rails

**URL:** <https://www.ruby-forum.com/t/how-to-implement-click-and-drag-feature-in-rails/108769>\
**Category:** Rails\
**Created:** [July 6, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/how-to-implement-click-and-drag-feature-in-rails/108769 "2007-07-06T21:15:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kathy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/13edae/32.png) [@kathy](https://www.ruby-forum.com/u/kathy)\
**Post date:** [July 6, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/how-to-implement-click-and-drag-feature-in-rails/108769/1 "2007-07-06T21:15:29Z")

</div>

Hi, I don’t know if Ruby on Rails has an easy way to implement this  
feature. Basically it is similar to google map’s click on the map and  
can drag it vertically or horizontally. I also want to show some tv  
schedules in a panel then I can click and drag the panel to let it show  
other channels or other times.

I am new to Ajax, prototype, [script.aculo.us](http://script.aculo.us). I only know they support  
features such as drag and drop, etc. Does anyone know if they can  
support the feature I want to implement? Or rails has other ways to  
implement the feature I want? I really appreciate your help.

---

<div class="post-metadata">

**Author:** ![kathy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/13edae/32.png) [@kathy](https://www.ruby-forum.com/u/kathy)\
**Post date:** [July 6, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/how-to-implement-click-and-drag-feature-in-rails/108769/2 "2007-07-06T22:57:41Z")

</div>

Kathy Xu schrieb:

> 

Rails is not going to do those things, it is a server side technology.

prototype, [script.aculo.us](http://script.aculo.us) libraries may be able to support such feature

I encourage you to investigate those JS libraries more thoroughly.

/ak

---

<div class="post-metadata">

**Author:** ![kathy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/13edae/32.png) [@kathy](https://www.ruby-forum.com/u/kathy)\
**Post date:** [July 7, 2007, 1:07am UTC](https://www.ruby-forum.com/t/how-to-implement-click-and-drag-feature-in-rails/108769/3 "2007-07-07T01:07:26Z")

</div>

Andy K. wrote:

> prototype, [script.aculo.us](http://script.aculo.us) libraries may be able to support such feature

Thanks for your answer!

Basically I want to click and drag a panel in four directions. I saw  
[script.aculo.us](http://script.aculo.us) has draggable\_element. But it seems it cannot tell which  
direction is the drag suppose to go. How does it know if I want to drag  
towards left, or towards right?
