English 中文(简体)
multiple resizables acting strange
原标题:

I m trying to place multiple resizable and draggable div s on one page that move (vertically) inside their own parent div. you can take a look at http://bit.ly/bCutBE

However, these div s act really strange when I want to resize them, especially from the north side, they kind of move out of the screen very fast, while they shouldn t be able to get outside the parent div. I only want the div to be able to move and resize vertically inside it s parent, the dragging-part works pretty good, but the resize part give this problem.

I can t really describe it better than this, but take a look for yourself and it will be clear immediately when you try to resize one of the coloured div s: move it a little downwards and try to resize it from the north side.

the problem seems to be caused by the containment: parent , line of the resizable. when I delete this line it works fine, but then the coloured blocks don t stay in their parent, and I want them to stay inside their parent.

I hope someone can help me with this...

the jquery code I used:

$(document).ready(function(){
            $(".move")
                .draggable({
                    containment:  parent , 
                    grid: [50,50],
                    axis:  y 
                })
                .resizable({
                    containment:  parent , 
                    grid: [50,50],
                    handles:  n, s , 
                    minHeight: 50 
                });
        });
问题回答

this seems to be a bug with draggable and sortable you will find a workaround here





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签