title: Problems with Mobiscroll - orientationchange and access address bar crashes some mobile browsers
body: <p>Original Title but too long for post:
  "ASP.NET MVC 4, Razor, JQuery, JQueryMobile, Problems with Mobiscroll - orientationchange and access address bar crashes some mobile browsers. Changing scroller width and height does not work on some phones."</p>
  
  <p>The crash issue happens on Android 2.1.
  It does not happen on iPhone, HTC EVO 4G LTE or other HTCs.</p>
  
  <p>Changing the scroller width and height does not work on HTCs. If I change to landscape then the scroller is the same size as it should be in portrait. If I change it back to portrait then the scroller is the size it should have been in landscape.</p>
  
  <p>Here is the JQuery/Mobiscroll code:</p>
  
  <pre><code>  function createDatePicker(selector){
          if($("#input_date_1").scroller('isDisabled') != 'undefined'){
              var scrollWidth = ($("div[id='main_content']").width())  / 4;
              var scrollHeight = scrollWidth / 2.5;
              $("#input_" + selector).scroller({
                      preset: 'date',
                      minDate: new Date(2000, 0, 1),
                      maxDate: new Date(2020, 11, 31),
                      theme: 'android',
                      display: 'inline',
                      mode: 'scroller',
                      dateOrder: 'mmddyy',
                      width: scrollWidth,
                      height: scrollHeight,
                      onChange: function (valueText, inst) {
                          var lbl = $("#lbl_" + selector);
                          var date = $("#input_" + selector).scroller('getDate');
                          lbl.text(date.toDateString());
                      }
                  });
          }
  
    function setDatePickerWidthAndHeight(){ 
          var scrollWidth = ($("div[id='main_content']").width())  / 4;
          var scrollHeight = scrollWidth / 2.5;
          var selectorBase1 = "date_1";
  
           $("#input_" + selectorBase1).eq(0).scroller('option', 'width', scrollWidth);
           $("#input_" + selectorBase1).eq(0).scroller('option', 'height', scrollHeight);
      }
  
    $(function () {
          createDatePicker('date_1');
  
          $(window).bind('orientationchange', function (event) {
              setTimeout(setDatePickerWidthAndHeight(),100);
          });
      });
  </code></pre>
  
  <p>I am including these scripts in @section scripts {} which is rendered at the bottom of the page ( not sure if that is relevant ).</p>
  
  <p>Any help would be appreciated.</p>