homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

can't get autosize plugin to work with hidden div.

 11:52 pm on Jul 10, 2012 (gmt 0)

I'm having trouble getting Jack Moore's .autosize plugin to work with a textarea nested within a hidden div.

I have a hidden div that contains a printable report form. It's hidden because it only exists for printing and not for viewing on screen.

It has a textarea tag that is bound to the .autosize plugin that automatically resizes the height of the text area depending on the amount of text in the box before it's printed.
<div id='prt-workorder-window' style='display:none;'>
<textarea id='wo-Notes'></textarea>

I've tried using the jquery ":hidden" selector as part of the overall jquery selector
$('#prt-workorder-window:hidden textarea#wo-Notes').val(text).autosize();

but i can't get it to work. What am i doing wrong?



 12:31 am on Jul 11, 2012 (gmt 0)

Nevermind, I changed the selector syntax to:
$('#prt-workorder-window textarea#wo-Notes').val(text);

It now works.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved