jquery implements drag to adjust the table cell size code instance:
This section describes the use of jquery to implement table cells can be dragged by the mouse to resize the effect, of course, if let us completely write code, it may be more complex, but there are ready-made plug-ins can be used, as long as a few simple steps to achieve our requirements.
I. Introduction of related library files :
To use the relevant plug-in, it is necessary to introduce the relevant code file, as follows:
<script src= "/js/jquery-1.8.0.min.js" type= "Text/javascript" ></script> <script src= "/js/store.js" Type= "Text/javascript" ></script> <script src= "/js/jquery.resizablecolumns.js" type= "Text/javascript" ></script>
The above plug-in here is not available to download, there are many online, self-search can be.
two. Table Simple code:
<! doctype html> The above code is the table code we want to drag.
Three. How to use:
$ (function () {$ ("#thetable"). Resizablecolumns ({store:window.store});})
You can use the code as above to achieve the drag effect.
This effect is very simple, as long as the step by step in accordance with the above way.
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=14056
jquery-implemented drag to adjust table cell size code instance