Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • in reply to: Textarea Autoresize #77062

    ok nevermind, I hacked it together by adding a new script to the wp loadqueue that loads after page is complete. it works now :)

    thanks for the support

    in reply to: Textarea Autoresize #77061

    actually the id does exists, but I can’t seem to target anything on the page from avia.js. I tried something simple like

    jQuery('textarea').css('border','1px solid red !important'); but that does nothing either. I’ve tried adding the textarea via the wp-admin and also by adding the textarea in page.php, neither does anything, and the styles do not show up in firebug. The problem must be some sort of targetting issue.

    seems to be that when the avia script runs the textarea doesn’t exist yet, therefore it can not be targetted.

    in reply to: Textarea Autoresize #77058

    Hi, thanks for your reply. I’ve put the script where you said, just before the end of the document ready function, and added $('#textarea').textResizer(); below it just like the demo of the page I mentioned in the first post. (I just kept the ID easy, I’ll change it later).

    No JS errors show but it’s not working. full code (including the closer for document ready:

    $.fn.textResizer = function(options) {
    var el = $(this), h;
    var settings = {
    minHeight: el.height(),
    maxHeight: 300,
    duration: 100
    if (options) {
    $.extend(settings, options);
    var clone = el.clone().removeAttr('id').removeAttr('class').css({position:'absolute', top:'-9999em',left:'-9999em',width: el.width(), height: 'auto'}).appendTo('body');
    $(this).keyup(function(e) {
    h = clone.val(el.val()).height(0).scrollTop(10000).scrollTop() + 16;
    h = Math.min(Math.max(settings.minHeight, h), settings.maxHeight);
    if (el.height() != h) {
    if($.browser.msie) {
    } else {
    el.stop(1,1).animate({height: h}, settings.duration);
    return this;



    anything out of place?

Viewing 3 posts - 1 through 3 (of 3 total)