Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.94 KB  |  hits: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. jquery mobile device orientation change not resizing text area
  2. .message-entry{
  3.    margin-left:10px;
  4.    margin-right:0;
  5.    margin-bottom:-20px;
  6. }
  7.        
  8. <footer data-role="footer" id="footer" data-theme="b" data-position="fixed">              
  9.             <label class="label-message-entry" for="chatMessageEntry">Enter a message:</label>
  10.             <textarea rows="8" name="textarea" class="message-entry" id="chatMessageEntry"></textarea>
  11.             <a id="chatReplyButton" class="reply-button" data-role="button" data-icon="plus">Reply</a>              
  12.         </footer> <!--end footer-->
  13.        
  14. $(window).bind( 'orientationchange', function(e){
  15.         var newWidth = $(window).width();
  16.         $('.message-entry').css({'width':newWidth + 'px'});    
  17. });
  18.        
  19. @media all and (max-width: 480px) and (min-width: 321px){
  20.     .message-entry{
  21.         min-width:470px;
  22.     }
  23. }
  24. @media all and (max-width: 320px){
  25.     .message-entry{
  26.         min-width:310px;
  27.     }
  28. }