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

Time:09-15

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> <br/><meta name="Generator" content="EditPlus & gt;" <br/><meta HTTP - equiv="X - UA - Compatible" content="IE=edge, chrome=1"/& gt; <br/><br/><! - refer to CSS & gt; <br/><style type="text/CSS" & gt; <br/># top {<br/>display: block; <br/>width: 100%; <br/>Height: 100 px; <br/>The line - height: 100 px; <br/>} <br/># top li {<br/>width: 80px; <br/>height: 25px; <br/>The line - height: 25 px; <br/>list-style: none; <br/>float: left; <br/>Border: 1 px solid black; <br/>text-align: center; <br/>} <br/>The box {display: block; Width: 600 px; } <br/># # left and right {width: 600 px; float: left; } <br/># rightMenu {<br/>width: 100%; <br/>height: 50px; <br/>} <br/># rightMenu p {<br/>Width: 60 px; <br/>height: 25px; <br/>The line - height: 25 px; <br/>float:left; <br/>margin-left:5px; <br/>} <br/># rightMenu input {<br/>Width: 40 px; <br/>height: 25px; <br/>The line - height: 25 px; <br/>} <br/><br/>The box p {<br/>width: 200px; <br/>height:200px; <br/>Display: block <br/>} <br/><br/>. Close {<br/>position: absolute; <br/>Right: 5 px; <br/>} <br/></style> <br/><link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/css/style.css"/& gt; <br/><link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/css/jquery-ui.css" & gt; <br/><! - reference js - & gt; <br/><script SRC="http://www.jq22.com/jquery/jquery-1.10.2.js" & gt; </script> <br/><The script type="text/javascript" SRC="https://bbs.csdn.net/topics/js/drag.js" & gt; </script> <br/><script SRC="http://www.jq22.com/jquery/jquery-ui-1.11.0.js" & gt; </script> <br/><br/><script> <br/>Var currentId=""; <br/><br/><br/>The function the init () {<br/>$(' div 'box - 5). Each (function () {<br/>$(this). Dragging ({<br/>Move: 'both', <br/>RandomPosition: true, <br/>Hander: 'hander' <br/>}); <br/><br/>}); <br/><br/>$(" UI widgets - content "). Each (function () {<br/><br/>$(this). The resizable ({<br/>AspectRatio: true//open scaling, you can also specify the scale: 16/9 <br/>}); <br/><br/>$(this). The bind (" click ", function () {<br/>CurrentId=$(this). Attr (" id "); <br/>}) <br/>}); <br/>} <br/><br/>$(function () {<br/>Var picIndex=0; <br/>Var videoIndex=0; <br/>Var marqueeIndex=0; <br/><br/><br/>$(". AddPic "). Click (function () {<br/>Var id=picIndex + 1; <br/>PicIndex=id; <br/>Var content="image" + id; <br/>Var divId='PIC' + id; <br/>Var HTML='& lt; Div id="' + divId + '" & gt; <I & gt; </i> <p> '+ content + & lt;/p> </div> '<br/>$(" box "). The HTML ($(" box "). The HTML () + HTML); <br/>//init (); <br/>$(" # "+ divId). The width (200); <br/>$(" # "+ divId). Height (200); <br/>$(" box - 5 # "+ divId). Dragging ({<br/>Move: 'both', <br/>RandomPosition: true, <br/>Hander: 'hander' <br/>}); <br/><br/>$(" # "+ divId). The resizable ({<br/>AspectRatio: true//open scaling, you can also specify the scale: 16/9 <br/>}); <br/><br/>$(" # "+ divId) bind (" click", function () {<br/>CurrentId=$(this). Attr (" id "); <br/>}) <br/><br/>}) <br/><br/>$(". AddVideo "). Click (function () {<br/>Var id=videoIndex + 1; <br/>VideoIndex=id; <br/>Var content="video" + id; <br/>Var divId='video' + id; <br/>Var HTML='& lt; Div id="' + divId + '" & gt; <I & gt; </i> <p> '+ content + & lt;/p> </div> '<br/>$(" box "). The HTML ($(" box "). The HTML () + HTML); <br/>//init (); <br/>$(" # "+ divId). The width (200); <br/>$(" # "+ divId). Height (200); <br/>$(" box - 5 # "+ divId). Dragging ({<br/>Move: 'both', <br/>RandomPosition: true, <br/>Hander: 'hander' <br/>}); <br/><br/>$(" # "+ divId). The resizable ({<br/>AspectRatio: true//open scaling, you can also specify the scale: 16/9 <br/>}); <br/><br/>$(" # "+ divId) bind (" click", function () {<br/>CurrentId=$(this). Attr (" id "); <br/>}) <br/>}) <br/><br/>$(". AddMarquee "). Click (function () {<br/>Var id=marqueeIndex + 1; <br/>MarqueeIndex=id; <br/>Var content="entertaining diversions" + id; <br/>Var divId='marque' + id; <br/>Var HTML='& lt; Div id="' + divId + '" & gt; <I & gt; </i> <p> '+ content + & lt;/p> </div> '<br/>$(" box "). The HTML ($(" box "). The HTML () + HTML); <br/>//init (); <br/>$(" # "+ divId). The width (200); <br/>$(" # "+ divId). Height (200); <br/>$(" box - 5 # "+ divId). Dragging ({<br/>Move: 'both', <br/>RandomPosition: true, <br/>Hander: 'hander' <br/>}); <br/><br/>$(" # "+ divId). The resizable ({<br/>AspectRatio: true//open scaling, you can also specify the scale: 16/9 <br/>}); <br/><br/>$(" # "+ divId) bind (" click", function () {<br/>CurrentId=$(this). Attr (" id "); <br/>}) <br/>}) <br/><br/><br/>//change the box height <br/>$(" input1 "). The keyup (function () {<br/>Var screenHeight=$(this). Val (); <br/>$(" box "). The CSS (" height "screenHeight +" px "); <br/>}); <br/><br/>//change the box height <br/>$(" input2 "). The keyup (function () {<br/>Var screenWidth=$(this). Val (); <br/>$(" box "). The CSS (" width, "screenWidth +" px "); <br/>}); <br/><br/>//change the small module left <br/>$(" input3 "). The keyup (function () {<br/>nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/1065.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/1065.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/1064.html'>Help see this callback function execution order problem?</a></div> <div class="detail-arr-right">Next:<a href='/frontend/1066.html'>Login to write a small function, the background can be normal return data, but the reception error 4</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=JavaScript' target='_blank'>JavaScript</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>