Back To Top
Login
Register
Visit Us At TwitterVisit Us At YouTubeVisit Us At Facebook
KandiChat is in Beta Release. Try It Out
HomeHome  
  • UpdatesUpdates  
  • SearchSearch  
  • RegisterRegister  
  • Log inLog in  
  • September 2017
    MonTueWedThuFriSatSun
        123
    45678910
    11121314151617
    18192021222324
    252627282930 

    Calendar Calendar

    Search
     
     

    Display results as :
     


    Rechercher Advanced Search

    Shopmotion


    Who is online?
    In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

    None

    Most users ever online was 22 on June 26th 2013, 6:10 am
    RSS feeds


    Poll
    Top posting users this week


    View previous topic View next topic Go down  Message [Page 1 of 1]

    avatar

    Auto Re-sizing textareas

    Mr.EasyBB
    03/19/2013
      Hey guys, today I am giving you a plugin that works well with the forumotion forums. It's not very hard all you have to do is add this script to your javascript management. 

      
    Code:

      // Autosize 1.13 - jQuery plugin for textareas
    // (c) 2012 Jack Moore - jacklmoore.com
    // license: www.opensource.org/licenses/mit-license.php
    (function(e){var t="hidden",n="border-box",r="lineHeight",i='<textarea tabindex="-1" style="position:absolute; top:-9999px; left:-9999px; right:auto; bottom:auto; -moz-box-sizing:content-box; -webkit-box-sizing:content-box; box-sizing:content-box; word-wrap:break-word; height:0 !important; min-height:0 !important; overflow:hidden;"/>',s=["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],o="oninput",u="onpropertychange",a=e(i)[0];a.setAttribute(o,"return"),e.isFunction(a[o])||u in a?(e(a).css(r,"99px"),e(a).css(r)==="99px"&&s.push(r),e.fn.autosize=function(r){return r=r||{},this.each(function(){function b(){var e,n,i;p||(p=!0,l.value=a.value,l.style.overflowY=a.style.overflowY,i=parseInt(a.style.height,10),l.style.width=f.css("width"),l.scrollTop=0,l.scrollTop=9e4,e=l.scrollTop,n=t,e>h?(e=h,n="scroll"):e<c&&(e=c),e+=m,a.style.overflowY=n,i!==e&&(a.style.height=e+"px",y&&r.callback.call(a)),setTimeout(function(){p=!1},1))}var a=this,f=e(a),l,c=f.height(),h=parseInt(f.css("maxHeight"),10),p,d=s.length,v,m=0,g=a.value,y=e.isFunction(r.callback);if(f.css("box-sizing")===n||f.css("-moz-box-sizing")===n||f.css("-webkit-box-sizing")===n)m=f.outerHeight()-f.height();if(f.data("mirror")||f.data("ismirror"))return;l=e(i).data("ismirror",!0).addClass(r.className||"autosizejs")[0],v=f.css("resize")==="none"?"none":"horizontal",f.data("mirror",e(l)).css({overflow:t,overflowY:t,wordWrap:"break-word",resize:v}),h=h&&h>0?h:9e4;while(d--)l.style[s[d]]=f.css(s[d]);e("body").append(l),u in a?o in a?a[o]=a.onkeyup=b:a[u]=b:(a[o]=b,a.value="",a.value=g),e(window).resize(b),f.bind("autosize",b),b()})}):e.fn.autosize=function(e){return this}})(jQuery);
    $(function(){
        $('#text_editor_textarea').autosize(); 
    });
     

     That is it for all forums too!
    Share this post on: Excite BookmarksDiggRedditDel.icio.usGoogleLiveSlashdotNetscapeTechnoratiStumbleUponNewsvineFurlYahooSmarking

    avatar
    Thank you, but is no longer operating with the new editor

    Post on June 22nd 2013, 1:56 pm by fascicularia

    avatar
    I have a new tutorial for the new editor coming out on AvacWeb.com soon

    Post on June 23rd 2013, 7:37 pm by Mr.EasyBB

    avatar
    thank you very much.
    I am very sorry that this forum closes:cry:

    Post on June 24th 2013, 2:05 pm by pedrox

    avatar
    Its ok, The EasyBB tutorials section is up now

    Post on June 24th 2013, 3:01 pm by Mr.EasyBB

    Post  by Sponsored content

    View previous topic View next topic Back to top  Message [Page 1 of 1]