Home >
front end > Who help look at this is why the second can't drag
Who help look at this is why the second can't drag
Add a second can drag and drop the modules can be not scaling of the first don't know why
I can't go to the accessories
<meta HTTP - equiv="content-type" Content="text/HTML. Charset=utf-8 "/& gt;
The DO & lt;/title>
<meta name="Generator" content="EditPlus & gt;"
<meta HTTP - equiv="X - UA - Compatible" content="IE=edge, chrome=1"/& gt;
<style type="text/CSS" & gt;
# top {
display: block;
width: 100%;
Height: 100 px;
The line - height: 100 px;
}
# top li {
width: 80px;
height: 25px;
The line - height: 25 px;
list-style: none;
float: left;
Border: 1 px solid black;
text-align: center;
}
The box {display: block; Width: 600 px; }
# # left and right {width: 600 px; float: left; }
# rightMenu {
width: 100%;
height: 50px;
}
# rightMenu p {
Width: 60 px;
height: 25px;
The line - height: 25 px;
float:left;
margin-left:5px;
}
# rightMenu input {
Width: 40 px;
height: 25px;
The line - height: 25 px;
}
The box p {
width: 200px;
height:200px;
Display: block
}
. Close {
position: absolute;
Right: 5 px;
}
</style>
<link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/css/style.css"/& gt;
<link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/css/jquery-ui.css" & gt;
<script SRC="http://www.jq22.com/jquery/jquery-1.10.2.js" & gt; </script>
<script SRC="http://www.jq22.com/jquery/jquery-ui-1.11.0.js" & gt; </script>
<script>
Var currentId="";
The function the init () {
$(' div 'box - 5). Each (function () {
$(this). Dragging ({
Move: 'both',
RandomPosition: true,
Hander: 'hander'
});
});
$(" UI widgets - content "). Each (function () {
$(this). The resizable ({
AspectRatio: true//open scaling, you can also specify the scale: 16/9
});
$(this). The bind (" click ", function () {
CurrentId=$(this). Attr (" id ");
})
});
}
$(function () {
Var picIndex=0;
Var videoIndex=0;
Var marqueeIndex=0;
$(". AddPic "). Click (function () {
Var id=picIndex + 1;
PicIndex=id;
Var content="image" + id;
Var divId='PIC' + id;
Var HTML='& lt; Div id="' + divId + '" & gt; '+ content + & lt;/p>
'
$(" box "). The HTML ($(" box "). The HTML () + HTML);
//init ();
$(" # "+ divId). The width (200);
$(" # "+ divId). Height (200);
$(" box - 5 # "+ divId). Dragging ({
Move: 'both',
RandomPosition: true,
Hander: 'hander'
});
$(" # "+ divId). The resizable ({
AspectRatio: true//open scaling, you can also specify the scale: 16/9
});
$(" # "+ divId) bind (" click", function () {
CurrentId=$(this). Attr (" id ");
})
})
$(". AddVideo "). Click (function () {
Var id=videoIndex + 1;
VideoIndex=id;
Var content="video" + id;
Var divId='video' + id;
Var HTML='& lt; Div id="' + divId + '" & gt;
'+ content + & lt;/p>
'
$(" box "). The HTML ($(" box "). The HTML () + HTML);
//init ();
$(" # "+ divId). The width (200);
$(" # "+ divId). Height (200);
$(" box - 5 # "+ divId). Dragging ({
Move: 'both',
RandomPosition: true,
Hander: 'hander'
});
$(" # "+ divId). The resizable ({
AspectRatio: true//open scaling, you can also specify the scale: 16/9
});
$(" # "+ divId) bind (" click", function () {
CurrentId=$(this). Attr (" id ");
})
})
$(". AddMarquee "). Click (function () {
Var id=marqueeIndex + 1;
MarqueeIndex=id;
Var content="entertaining diversions" + id;
Var divId='marque' + id;
Var HTML='& lt; Div id="' + divId + '" & gt;
'+ content + & lt;/p>
'
$(" box "). The HTML ($(" box "). The HTML () + HTML);
//init ();
$(" # "+ divId). The width (200);
$(" # "+ divId). Height (200);
$(" box - 5 # "+ divId). Dragging ({
Move: 'both',
RandomPosition: true,
Hander: 'hander'
});
$(" # "+ divId). The resizable ({
AspectRatio: true//open scaling, you can also specify the scale: 16/9
});
$(" # "+ divId) bind (" click", function () {
CurrentId=$(this). Attr (" id ");
})
})
//change the box height
$(" input1 "). The keyup (function () {
Var screenHeight=$(this). Val ();
$(" box "). The CSS (" height "screenHeight +" px ");
});
//change the box height
$(" input2 "). The keyup (function () {
Var screenWidth=$(this). Val ();
$(" box "). The CSS (" width, "screenWidth +" px ");
});
//change the small module left
$(" input3 "). The keyup (function () {
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull