Note that there are some explanatory texts on larger screens.

plurals
  1. POJQuery Mobile Menu does not work after loading another view
    primarykey
    data
    text
    <p>I am working on asp.net MVC 4 Mobile template and trying to have navigation menu on _layout view </p> <p>Environment: XP, Visual web developer 2010 express, VB.</p> <p>following is my _Layout view</p> <pre><code>&lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;title&gt;@ViewData("Title")&lt;/title&gt; &lt;meta name="viewport" content="width=device-width" /&gt; &lt;link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /&gt; @Styles.Render("~/Content/mobileCss", "~/Content/css") @Scripts.Render("~/bundles/modernizr") &lt;/head&gt; &lt;body&gt; @*---Master Page---*@ &lt;div data-role="page" data-theme="b"&gt; @*---Header Image---*@ &lt;div data-role="header"&gt; &lt;div&gt; &lt;img src='@Url.Content("~\Content\Images\Banner.jpg")' alt="Header Img" style="max-width:100%;" /&gt; &lt;/div&gt; &lt;/div&gt; @*---Menu---*@ &lt;a href="#" id="search-area-switch" &gt;Menu&lt;/a&gt; &lt;div id="dvMenu" style="display:none"&gt; &lt;ul data-role="listview" data-theme="a" &gt; &lt;li data-role="list-divider"&gt; Select Search Type&lt;/li&gt; @Code Dim menu As New Dictionary(Of String, String)() menu = CType(Session("menu"), Dictionary(Of String, String)) @For Each item As KeyValuePair(Of String, String) In menu @&lt;li&gt; &lt;a href='@item.Value' &gt; @item.Key &lt;/a&gt; &lt;/li&gt; Next End Code &lt;/ul&gt; &lt;/div&gt; @*---Page Heading---*@ @ViewData("SearchType").ToString() @*---Content/child view---*@ &lt;div data-role="content" &gt; @RenderBody() &lt;/div&gt; &lt;/div&gt; @Scripts.Render("~/bundles/jquery", "~/bundles/jquerymobile") @RenderSection("scripts", required:=False) @*--- Menu Toggle script ---*@ &lt;script type="text/javascript"&gt; $('#search-area-switch').live('tap', function (event) { $('#dvMenu').toggle("slow"); }); &lt;/script&gt; &lt;/body&gt; </code></pre> <p></p> <p>Now on initial load the menu toggling works fine, but when i select an item under the menu, which returns another view, everything looks good but the menu does not work any more.</p> <p>What am i doing wrong ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload