|
di chuyển và thay đổi kích thước shout box; Codes & Modifications zetaboard f2
|
|
Topic Started: 19/05/2010 - 10:19 pm (1,287 Views)
|
|
Bietsosothoi
|
19/05/2010 - 10:19 pm
Post #1
|
- Posts:
- 355
- Group:
- Cấp 8
- Member
- #120
- Joined:
- 10/04/2010
- Nghề nghiệp :
- Nhà nước
- Châm Ngôn Sống :
- biết sơ sơ thôi ^^
|
Thấy code này lạ nữa... mọi người test cho ý kiến nhé
- Code:
-
<script type="text/javascript"> /* * jqDnR - Minimalistic Drag'n'Resize for jQuery. * * Copyright (c) 2007 Brice Burgess <bhb@iceburg.net>, http://www.iceburg.net * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * $Version: 2007.08.19 +r2 */
(function($){ $.fn.jqDrag=function(h){return i(this,h,'d');}; $.fn.jqResize=function(h){return i(this,h,'r');}; $.jqDnR={dnr:{},e:0, drag:function(v){ if(M.k == 'd')E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY}); else E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)}); return false;}, stop:function(){E.css('opacity',M.o);$().unbind('mousemove',J.drag).unbind('mouseup',J.stop);} }; var J=$.jqDnR,M=J.dnr,E=J.e, i=function(e,h,k){return e.each(function(){h=(h)?$(h,e):e; h.bind('mousedown',{e:e,k:k},function(v){var d=v.data,p={};E=d.e; // attempt utilization of dimensions plugin to fix IE issues if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}} M={X:p.left||f('left')||0,Y:p.top||f('top')||0,W:f('width')||E[0] .scrollWidth||0,H:f('height')||E[0].scrollHeight||0,pX:v.pageX,pY:v.pageY,k:d.k,o:E.css('opacity')}; E.css({opacity:0.8});$().mousemove($.jqDnR.drag).mouseup($.jqDnR.stop); return false; }); });}, f=function(k){return parseInt(E.css(k))||false;}; })(jQuery); </script>
|
|
| |
|
Bietsosothoi
|
20/05/2010 - 05:44 pm
Post #2
|
- Posts:
- 355
- Group:
- Cấp 8
- Member
- #120
- Joined:
- 10/04/2010
- Nghề nghiệp :
- Nhà nước
- Châm Ngôn Sống :
- biết sơ sơ thôi ^^
|
còn code này ai giải thích dùm mình với.
|
|
| |
|
dread4everyone
|
20/05/2010 - 06:19 pm
Post #3
|
[url]http://k45-4102.org/[/url]
- Posts:
- 59
- Group:
- Cấp 5
- Member
- #193
- Joined:
- 06/05/2010
- Nghề nghiệp :
- Sinh Viên
- Đến Từ :
- http://k45-4102.org/
- Địa Chỉ Web - Forum -Blog :
- http://k45-4102.org/
|
- Bietsosothoi
- 20/05/2010 - 05:44 pm
còn code này ai giải thích dùm mình với. Khi dùng code hiện cửa sổ emoticon trên shoutbox, bạn dùng thêm code này để di chuyển và thay đổi kích thước của cái sổ ấy
|
 http://k45-4102.org/index
|
| |
|
Bietsosothoi
|
20/05/2010 - 06:21 pm
Post #4
|
- Posts:
- 355
- Group:
- Cấp 8
- Member
- #120
- Joined:
- 10/04/2010
- Nghề nghiệp :
- Nhà nước
- Châm Ngôn Sống :
- biết sơ sơ thôi ^^
|
bạn cho cái demo. chứ mình chưa hiểu.
|
|
| |
|
dread4everyone
|
20/05/2010 - 07:00 pm
Post #5
|
[url]http://k45-4102.org/[/url]
- Posts:
- 59
- Group:
- Cấp 5
- Member
- #193
- Joined:
- 06/05/2010
- Nghề nghiệp :
- Sinh Viên
- Đến Từ :
- http://k45-4102.org/
- Địa Chỉ Web - Forum -Blog :
- http://k45-4102.org/
|
Tại khung shoutbox như của tthl ấy, bạn click vào 'Smiles' sẽ có cửa sổ emoticon . Nếu như không dùng đoạn scrpit trên thì cái cửa sổ ấy không thể kéo thả ra vị trí khác hoặc là cũng không thể thay đổi kích thước của cái cửa sổ ấy được.
|
 http://k45-4102.org/index
|
| |
|
tvnannhaungayxua
|
11/10/2010 - 07:43 pm
Post #6
|
- Posts:
- 32
- Group:
- Cấp 3
- Member
- #4,435
- Joined:
- 10/10/2010
- Nghề nghiệp :
- Sinh Viên
- Y!M :
- taffy_nikolas
- Châm Ngôn Sống :
- Biết mà không chia sẻ thì biết mà làm gì !
- Đến Từ :
- Yesterday
|
- Bietsosothoi
- 19/05/2010 - 10:19 pm
Thấy code này lạ nữa... mọi người test cho ý kiến nhé- Code:
-
<script type="text/javascript"> /* * jqDnR - Minimalistic Drag'n'Resize for jQuery. * * Copyright (c) 2007 Brice Burgess <bhb@iceburg.net>, http://www.iceburg.net * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * $Version: 2007.08.19 +r2 */
(function($){ $.fn.jqDrag=function(h){return i(this,h,'d');}; $.fn.jqResize=function(h){return i(this,h,'r');}; $.jqDnR={dnr:{},e:0, drag:function(v){ if(M.k == 'd')E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY}); else E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)}); return false;}, stop:function(){E.css('opacity',M.o);$().unbind('mousemove',J.drag).unbind('mouseup',J.stop);} }; var J=$.jqDnR,M=J.dnr,E=J.e, i=function(e,h,k){return e.each(function(){h=(h)?$(h,e):e; h.bind('mousedown',{e:e,k:k},function(v){var d=v.data,p={};E=d.e; // attempt utilization of dimensions plugin to fix IE issues if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}} M={X:p.left||f('left')||0,Y:p.top||f('top')||0,W:f('width')||E[0] .scrollWidth||0,H:f('height')||E[0].scrollHeight||0,pX:v.pageX,pY:v.pageY,k:d.k,o:E.css('opacity')}; E.css({opacity:0.8});$().mousemove($.jqDnR.drag).mouseup($.jqDnR.stop); return false; }); });}, f=function(k){return parseInt(E.css(k))||false;}; })(jQuery); </script>
Cho Code nay vao đâu ạ ?
|
|
|
| |
|
dragonland
|
11/10/2010 - 09:00 pm
Post #7
|
- Posts:
- 4
- Group:
- Tân Thủ Môn
- Member
- #4,561
- Joined:
- 11/10/2010
|
thanh nhiu
|
|
|
| |
|
dread4everyone
|
12/10/2010 - 03:50 am
Post #8
|
[url]http://k45-4102.org/[/url]
- Posts:
- 59
- Group:
- Cấp 5
- Member
- #193
- Joined:
- 06/05/2010
- Nghề nghiệp :
- Sinh Viên
- Đến Từ :
- http://k45-4102.org/
- Địa Chỉ Web - Forum -Blog :
- http://k45-4102.org/
|
- tvnannhaungayxua
- 11/10/2010 - 07:43 pm
- Bietsosothoi
- 19/05/2010 - 10:19 pm
Thấy code này lạ nữa... mọi người test cho ý kiến nhé- Code:
-
<script type="text/javascript"> /* * jqDnR - Minimalistic Drag'n'Resize for jQuery. * * Copyright (c) 2007 Brice Burgess <bhb@iceburg.net>, http://www.iceburg.net * Licensed under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * $Version: 2007.08.19 +r2 */
(function($){ $.fn.jqDrag=function(h){return i(this,h,'d');}; $.fn.jqResize=function(h){return i(this,h,'r');}; $.jqDnR={dnr:{},e:0, drag:function(v){ if(M.k == 'd')E.css({left:M.X+v.pageX-M.pX,top:M.Y+v.pageY-M.pY}); else E.css({width:Math.max(v.pageX-M.pX+M.W,0),height:Math.max(v.pageY-M.pY+M.H,0)}); return false;}, stop:function(){E.css('opacity',M.o);$().unbind('mousemove',J.drag).unbind('mouseup',J.stop);} }; var J=$.jqDnR,M=J.dnr,E=J.e, i=function(e,h,k){return e.each(function(){h=(h)?$(h,e):e; h.bind('mousedown',{e:e,k:k},function(v){var d=v.data,p={};E=d.e; // attempt utilization of dimensions plugin to fix IE issues if(E.css('position') != 'relative'){try{E.position(p);}catch(e){}} M={X:p.left||f('left')||0,Y:p.top||f('top')||0,W:f('width')||E[0] .scrollWidth||0,H:f('height')||E[0].scrollHeight||0,pX:v.pageX,pY:v.pageY,k:d.k,o:E.css('opacity')}; E.css({opacity:0.8});$().mousemove($.jqDnR.drag).mouseup($.jqDnR.stop); return false; }); });}, f=function(k){return parseInt(E.css(k))||false;}; })(jQuery); </script>
Cho Code nay vao đâu ạ ? Sau đợt update vào hôm 11/06 lên jquery 1.4.2 Cái code kéo thả và resize này không còn tác dụng nữa
|
 http://k45-4102.org/index
|
| |
|
dtgiang251
|
12/10/2010 - 09:27 pm
Post #9
|
- Posts:
- 27
- Group:
- Cấp 2
- Member
- #4,112
- Joined:
- 06/10/2010
|
Trời, code hay vậy mà hỏng hả các bạn
|
|
|
| |
| 1 user reading this topic (1 Guest and 0 Anonymous)
|