[Html] <div style="height: 100%; width:100%"> @Html.EJMobile().NavigationDrawer("navpane").Width(200).TargetId("Header_rightbutton"). ContentTemplate(@<div> <h1>Websites</h1> <div id="Web1" class="temptext e-m-state-active">Syncfusion</div> <div id="Web2" class="temptext">Tutorials Point</div> <div id="Web3" class="temptext">Apache Cordova</div> <div id="Web4" class="temptext">Angular JS</div> <div id="Web5" class="temptext">W3 schools</div> |
[Html] <script> $(".temptext").bind('click', function (e) { //scripts to load the website within the Navigation Drawer iframe
//Closes the NavigationDrawer on item select $("#navpane").ejmNavigationDrawer("close");
//Variable to store the selected item id var tempid = e.target.id;
//Loads the website into the iframe as per the item selected if (tempid == "Web1") $("#frame").attr("src", "http://www.syncfusion.com")
else if (tempid == "Web2") $("#frame").attr("src", "http://www.tutorialspoint.com")
else if (tempid == "Web3") $("#frame").attr("src", "http://cordova.apache.org")
else if (tempid == "Web4") $("#frame").attr("src", "https://angularjs.org")
else if (tempid == "Web5") $("#frame").attr("src", "http://www.w3schools.com")
//Removes the previous selected item color $('.temptext').removeClass("e-m-state-active"); //Adds the active item color to selected item |
[HTML] <style> .e-m-state-active { background-color: #007aff; /*background color*/ color: white !important; /*font color*/ |
[HTML] @Html.EJMobile().NavigationDrawer("navpane").TargetId("Header_rightbutton") |