title: how to hide html elements from windows phone webbrowser control
body: <p>a little intro about what i need but cant find a complete answer anywhere. i use webbrowser control to show an website in my app, but i want to remove the above navigation which is alone in an html  element with the class name "tabs-outer". i want to do this in my app and not in the css of the homepage, because it is made to show the content for mobile devices and i just want to display in my app in the webbrowser control without it and on desktop/mobile site that it remains visible like it is.</p>
  
  <p>i found some java script codes like <strong>"$('#mydiv').allBut().hide();"</strong> i understand i must add something like <strong>"$('.tabs-outer').allBut().hide();"</strong> but where?! i have no clue, where to input this, how to call it in the app?! i need more info please. i found a thread that is 2 years old but no info about what exactly to do.</p>
  
  <p>How and where to use this javascript, is it possible to add it in the app, so i call it in runtime this script?! any help? I am a newbie so i dont know anything about javascripts, and nothing about it from within windows phone and c#.</p>
  
  <p>this is the way i use it now:</p>
  
  <pre><code>protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
      {
  
          String url = NavigationContext.QueryString["url"];
          if (!String.IsNullOrEmpty(url))
          {
             WebBrowser.Navigate(new Uri(url));
          }
  
      }
      private void WebBrowser_LoadCompleted(object sender, NavigationEventArgs e)
      {
          WebBrowser.InvokeScript("RemoveNav");
          SystemTray.SetProgressIndicator(this, null);
          WebBrowser.Visibility = Visibility.Visible;
      }
  </code></pre>
  
  <p>and i added a script on my webpage in the header like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function RemoveNav() 
  { 
  $('.tabs-outer').not(this).hide() 
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>and it works but, i must set the visibility of the webbrowser control to collapsed for the page to load - "hide" the element i want and then make is visible. but i need something to intercept the loading of this element, but only in my windows phone app in the webbrowser control.</p>