不能使它可调整大小

时间:2011-09-22 04:46:43

标签: jquery

让它更容易

我会把这段代码放在同一个地方

  <style>  p { color:red; margin:5px; cursor:pointer; }  </style>
   <script src="http://code.jquery.com/jquery-latest.js"></script>

 <script> 
    $("p.good").click(function () {  
      $(".res").css("background-color","yellow");          
      $( ".res" ).resizable();


          });  

</script>
         <table width="100%" border="1" cellspacing="1" cellpadding="1>

<td><div id="1a" class="res">jehad </div></td>
<td> <p class="good">make</p></td>
<td><div class="res">jeyad </div></td>

2 个答案:

答案 0 :(得分:2)

ResizeableJQuery UI的一部分,jquery-latest.js中未包含该内容。

答案 1 :(得分:0)

它现在正在工作:)

    <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>jQuery UI Resizable - Maximum / minimum size</title>
    <link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
  <script src="js/jquery.min.js"></script>
  <script src="js/jquery-ui-1.8.13.custom.min.js"></script>

    <style>
    #resizable { width: 440px; height: 150px; padding: 5px; border-right:5px #3C0 solid; }

    </style>

    <style type="text/css">
.tableres
{ 
border-collapse:collapse;
}
.tableres, td, th
{
border:1px solid black;
}
.ul1 {


}
</style>

    <script>


    $('.ul1').live('click', function() {
  // Bound handler called.



    $(function() {
        $( ".ui-widget-content" ).resizable({

            maxWidth: 780,
            minWidth: 100
        });
    });

    });

    </script>
</head>
<body>

<div class="demo">

<table class="tableres" width="880px" cellspacing="0" cellpadding="0">
  <tr>
    <td width="10%" align="center" valign="top"><div id="resizable" class="ui-widget-content ul1"></div></td>
    <td width="90%" align="center" valign="top"><div class="ul1" >make me resize</div></td>

  </tr>
</table>


</div><!-- End demo -->




</body>
</html>