0

I am not sure where to start with this or even what keywords to search for, so I am asking for someone to point me in the right direction. Here is what I am wanting.

I am wanting to make a webpage that can be dragged in all directions with different HTML elements in all directions and load new elements as you get close to the edges via AJAX. I am hoping to achieve this via Bootstrap or JQuery.

Any ideas on how to get the page draggable like that?

Protomen
  • 9,471
  • 9
  • 57
  • 124
alexander7567
  • 665
  • 13
  • 35
  • @humble.rumble that does not seem to be doing what I want it to do.. It just makes it where you can drag the element in other parts of the page.. I want the page to "scroll" in all directions. http://jsfiddle.net/vf0b7pLL/ – alexander7567 Jun 14 '15 at 01:39

1 Answers1

2

jQuery UI has a draggable method that would work for you, as long as you target the viewable area as the element to initiallize the plugin on. If you prefer a more lightweight approach you can use this plugin created by Chris Coyier.: https://css-tricks.com/snippets/jquery/draggable-without-jquery-ui/.

An example of it working in just 2 directions would be found in this SO thread as well: Scroll the page on drag with jQuery however the actual plugin being used in the demo supports all direction dragging - see the authors site: http://davetayls.me/jquery.kinetic/

Community
  • 1
  • 1
AlphaG33k
  • 1,588
  • 1
  • 12
  • 24