title: Javascript functions don't work after MVC Upgrade
body: <p>I have upgraded a solution from MVC 3 to MVC 4.</p>
  
  <p>I have 2 specific JavaScript functions that does not work anymore after upgrade.</p>
  
  <ol>
  <li>Tabs</li>
  </ol>
  
  <p>This is how the tabs now render</p>
  
  <p><a href="https://i.stack.imgur.com/xg0zF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xg0zF.png" alt="Tab Rendering"></a></p>
  
  <p>I suspect it has to do with the JavaScript version with the new framework? I am not sure.</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function () {
      $("#tabs").tabs();
  
      $('.taberize').each(function () {
          var e = $(this);
          var panels = e.parents('.ui-tabs-panel');
          if (panels.length == 0) { return; }
          var tabId = $(panels[0]).attr('id');
          e.attr('href', e.attr('href') + '#' + tabId);
      });
  
      $(".container").each(function (e) {
          var height = $(document).height() - 230;
          $(this).height(height);
      });
  });
  </code></pre>
  
  <p></p>
  
  <p><hr>
   2. On Row Hover function</p>
  
  <p>The On-Row-Hover function does not work anymore, I have a "Action Menu" on the left side of my WebGrid, and on row hover, it display functions like Edit and Details menu... this is done in JavaScript.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  var prevRow = null;
              $('#gridData table tbody tr').not(':first').hover(function()
              {
                  $('#myMenu').hide();
                      if (prevRow != this)
                      {
  
                          if (prevRow != null)
                          {
                              $(prevRow).css("background","");
                              $('.actionButtons', $(prevRow)).hide(); 
                          }                       
  
                          $(this).css("background","#EDEFFF");
                          $('.actionButtons', $(this)).show();
                          prevRow = this;          
                      }
              },
              function()
              {
                      if (!$('#myMenu').is(":visible"))
                      {
                          if (prevRow != null)
                          {
                              $(prevRow).css("background","");
                              $('.actionButtons', $(prevRow)).hide(); 
                              prevRow = null;
                          }
                      }
              });
  
             $(".openmenu").contextMenu({ menu: 'myMenu', leftButton: true }, 
             function(action, el, pos) {
                  contextMenuWork(action, el.parents('tr')[0].id , pos);
  
             });
  
             function contextMenuWork(action, id) {
              switch (action) {
  
                  case "insert":
                      {
                       if($.browser.msie&amp;&amp;$.browser.version.substr(0,1)&lt;8){var url='@Url.Action("Create", "Account")';document.location=url}else{CreateNewAccount()}
                        break;
                      }
                  case "createtask":
                      {
                          var url = '@Url.Action("CreateFromAccount", "UserTask")' + '/' + id;
                          document.location = url;
                          break;
                      }
                  case "linkassessment":
                      {
                         var url = '@Url.Action("CreateFromAccount", "Questionnaire")' + '/' + id;
                         document.location = url;
                         break;
                      }
                  case "details":
                      {
                          var url = '@Url.Action("Details", "Account")' + '/' + id;
                          document.location = url;
                          break;
                      }  
                  case "edit":
                      {
                        var url = '@Url.Action("Edit", "Account")' + '/' + id;
                        document.location = url;
                        break;
                      }
                case "createperson":
                      {
                          if($.browser.msie&amp;&amp;$.browser.version.substr(0,1)&lt;8){var url='@Url.Action("Create", "Person")';document.location=url}else{CreateNewPerson(id)}
                          break;
                      }
                 case "createopportunity":
                      {
                        var url = '@Url.Action("Create", "Opportunity")' + '/' + id;
                        document.location = url;
                        break;
                      }  
  
               }
  
        }
  
          }); 
  &lt;/script&gt;
  
  &lt;div id="gridData"&gt;
              &lt;ul id="myMenu" class="contextMenu" style="display: none"&gt;
                  &lt;li class="insert"&gt;&lt;a href="#insert" id="create"&gt;Create New&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="detail"&gt;&lt;a href="#details"&gt;Details&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="edit"&gt;&lt;a href="#edit"&gt;Edit&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
  &lt;/div&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;th class="field-actions-account" style="width: 75px"&gt;
                          &lt;a href="#"&gt;Actions&lt;/a&gt;
                      &lt;/th&gt;
  &lt;tr id="@Html.Encode(item.AccountID)"&gt;
                          &lt;td&gt;
                          &lt;div class="actionButtons" style="display:none"&gt;
                               &lt;a href="@Url.Action("Edit", new { id = item.AccountID }) " style="text-decoration:none" title="Edit"&gt;&lt;img src="@Html.Raw(@Url.Content("~/Content/img/document-pencil-icon.png"))" alt="Edit" title="Edit" style="border:none"/&gt; &lt;/a&gt;
                               &lt;a href="@Url.Action("Details", new { id = item.AccountID }) " style="text-decoration:none" title="Details"&gt;&lt;img src="@Html.Raw(@Url.Content("~/Content/img/testDetailsIcon.gif"))" alt="Details" title="Details" style="border:none" /&gt; &lt;/a&gt;
                               &lt;img src="@Html.Raw(@Url.Content("~/Content/img/options.gif"))" alt="More Options" class="openmenu" title="More Options"/&gt;
                          &lt;/div&gt;
  </code></pre>