Last change
on this file since 377 was
69,
checked in by guille, 17 years ago
|
Se agrego Plugin Crayon y se actualizaron los esqueletos para que funcione
|
File size:
882 bytes
|
Line | |
---|
1 | (function($){ |
---|
2 | /* |
---|
3 | * resizehandle.js (c) Fil 2007, plugin pour jQuery |
---|
4 | * @ http://www.jquery.info/spip.php?article44 |
---|
5 | * Distribue sous licence GNU/LGPL et MIT |
---|
6 | */ |
---|
7 | $.fn.resizehandle = function() { |
---|
8 | return this.each(function() { |
---|
9 | var me = $(this); |
---|
10 | me.after( |
---|
11 | $('<div class="resizehandle"></div>') |
---|
12 | .css({height:'16px',width:Math.max(me.width()-4,10)}) // bug MSIE si 100% |
---|
13 | .bind('mousedown', function(e) { |
---|
14 | var h = me.height(); |
---|
15 | var y = e.clientY; |
---|
16 | var moveHandler = function(e) { |
---|
17 | me |
---|
18 | .height(Math.max(20, e.clientY + h - y)); |
---|
19 | }; |
---|
20 | var upHandler = function(e) { |
---|
21 | $('html') |
---|
22 | .unbind('mousemove',moveHandler) |
---|
23 | .unbind('mouseup',upHandler); |
---|
24 | }; |
---|
25 | $('html') |
---|
26 | .bind('mousemove', moveHandler) |
---|
27 | .bind('mouseup', upHandler); |
---|
28 | }) |
---|
29 | ); |
---|
30 | }); |
---|
31 | }; |
---|
32 | })(jQuery); |
---|
Note: See
TracBrowser
for help on using the repository browser.