jquery autoResize textarea does not work when in jquery ui tab

jquery autoResize textarea does NOT work when in jquery ui tab.

jquery autoResize works outside of tab.

See both examples in jsFiddle. Click the "Details" tab to see it not resize.

http://jsfiddle.net/remy/6BwqE/25/

this is using the autoresize by James Padolsey http://james.padolsey.com

Any ideas?

Answers


This bug appears to be when the original element is not visible on the page and thus the clone function in the plugin fails to find the width. This can be resolved by the following steps:

  1. Change clone to be a function (remove wrapping parens and ())
  2. Call the clone function in updateSize
  3. Trigger the updateSize event whenever a tab is shown or loads (up to you)

I've made the modifications in this fiddle: http://jsfiddle.net/6BwqE/29/

I inlined the modified source for the autoResize plugin and added a show event to the tabs call.


Need Your Help

Parsing XML data with php

php xml parsing

I am trying to pull text from a single element in an xml file, i was able to pull the entire file but i really only need a couple of lines from the file...

JavaScript Seems to Stop After AJAX Call

javascript jquery ajax typeerror each

The question title is rather vague, but here's my situation. I have roughly 700+ lines of jQuery for a web application, each function and "major point of interest" in the code noted by a log to the

Swing option other than JxTaskPane

java swing awt swingx jxtaskpane

I am using JxTaskPane to add menu items ..but i don't want to use it, as i don't want that expand and collapsed type of container .. i just want to arrange my menu items horizontally.