开发者

Jquery sortable, but from left <-> right and not up <-> down

开发者 https://www.devze.com 2023-03-21 02:42 出处:网络
I have looked around and i wast able to find a way so sort div elements from left to right and right to left.

I have looked around and i wast able to find a way so sort div elements from left to right and right to left.

What i am doing, is i am creating a website where a user can move navigation pane either to the right or do the left of the body pane.

I have looked at http://jqueryui.com/demos/sortable/ and it almost does what i need, although it sorts from top to bottom and reversal. Is there anything possible to do 开发者_开发百科the same only from left to right and in reversal.


jQuery UI sortable should do just fine.

Let's say your divs have a class "foobar". Just give them a width and float them:

div.foobar {
  width:100px;
  float:left;
  margin-right:5px;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消