Hello,
I have a Popover with a ListView of links. I would like someone to be able to click on a link, have it close and it navigates to the page. Here is the code that I have so far, I have it opening in the parent, but it doesn't close.
The current code is not closing the link for me. Using the Developer Tools when I debug the JS, the closeParentPopover is not being called when a link is clicked inside the Popover. Can someone help me out here? I would have thought that this would have been more simple.
I have a Popover with a ListView of links. I would like someone to be able to click on a link, have it close and it navigates to the page. Here is the code that I have so far, I have it opening in the parent, but it doesn't close.
<%@ Master Language="C#" AutoEventWireup="false" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>[[code removed]]</head><body> <a href="../index.html">Back</a> <div data-role="view" data-layout="overview-layout" id="overview-content" data-title="Title"> <form id="form1" runat="server"> <ul data-role="listview" data-style="inset" data-type="group"> <li> <ul> <li> <asp:ContentPlaceHolder ID="mainContent" runat="server"> </asp:ContentPlaceHolder> </li> </ul> </li> </ul> </form> <div data-role="popover" id="popover-people" data-popup='{"height": 230, "width": 350}'> <div data-role="view" data-title="People"> <div data-role="header"> <div data-role="navbar"> <span data-role="view-title"></span> <a data-role="button" data-align="right" data-click="closeParentPopover">Close</a> </div> </div> <ul data-role="listview"> <li><a data-target="_top" href="default1.aspx" data-click="closeParentPopover">Link 1</a></li> <li><a data-target="_top" href="default2.aspx" data-click="closeParentPopover">Link 2</a></li> <li><a data-target="_top" href="default3.aspx" data-click="closeParentPopover">Link 3</a></li> <li><a data-target="_top" href="default4.aspx" data-click="closeParentPopover">Link 4</a></li> <li><a data-target="_top" href="default5.aspx" data-click="closeParentPopover">Link 5</a></li> <li><a data-target="_top" href="default6.aspx" data-click="closeParentPopover">Link 6</a></li> </ul> </div> </div> </div> <div data-role="layout" data-id="overview-layout"> <header data-role="header"> <div data-role="navbar"> <!--a class="nav-button" data-align="left" data-role="backbutton">Back</a--> <span data-role="view-title">Title</span> <a data-align="right" data-rel="popover" data-role="button" class="nav-button" href="#popover-people">Login</a> </div> </header> </div> <script> function closeParentPopover(e) { var popover = e.sender.element.closest('[data-role=popover]').data('kendoMobilePopOver'); popover.close(); } </script> <script> window.kendoMobileApplication = new kendo.mobile.Application(document.body); </script></body></html>The current code is not closing the link for me. Using the Developer Tools when I debug the JS, the closeParentPopover is not being called when a link is clicked inside the Popover. Can someone help me out here? I would have thought that this would have been more simple.