w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Need to click Overflow Menu Item twice when other menu item in Action bar is selected
Is this known issue? It's known. It is not an issue. The drop-down for list navigation (what I presume the "Popup Spinner" is) has the focus. It takes a tap outside of the drop-down, anywhere in the activity, to dismiss the drop-down. This is not significantly different than the behavior of a Spinner anywhere else in Android. For example, edit a contact, and tap on the Spinner to change a phone number type (e.g., mobile vs. home vs. work). It takes a tap anywhere else to dismiss the drop-down list, before a tap will have any other meaning. Is there any workaround for this? Do not use list navigation or other Spinners in your app.

Categories : Android

Wordpress: Menu item 'forum' disappear when it becomes Current-menu-item
I wager that is is being hidden with CSS. Try to identify which style is applied to your menu item when it becomes active (probably the .active class is added), then look for it in your style.css or whatever. There's a chance that there is the following attribute being applied to it: .active { display: none; }

Categories : Wordpress

How do I add a sub-menu item to a menu item using dojo dijit/form/DropDownButton?
Vegetables and Fruits should be dijit/PopupMenuItems and each one should contain a dijit/Menu and the menu should have the corresponding dijit/MenuItems. The declarative menu example demonstrates it. In your case, the only difference is that instead of a context menu, the top level menu is a dijit/DropDownMenu. http://dojotoolkit.org/reference-guide/1.9/dijit/Menu.html#declarative-markup

Categories : Javascript

Twitter Bootstrap responsive menu/small devices: close/collapse menu on clicking a menu item
You can try something like.. $('.nav li a').on('click',function(){ $('.nav-collapse').collapse('hide'); }) This will work for menu links that are referencing '#'. The menu should already be collapsing if your menu links navigate to another page on the site as this would cause a full page refresh.

Categories : Twitter

MySQLi - select sub menu item from db if parentid same as top menu item id
You need to have a parent child relation between the top menu and the sub items, so you need to create an extra column in the sub items table, say, main_menu_id, after doing this, you need to assign id of the main menu to the sub menu item in that column. Later you will need a nested while loop using PHP and have to fetch the records accordingly. /* Loop Top Items Starts Loop Inner Items (Fetch Sub Items Having ID Of The Main Item) Loop Top Items Ends */ 1st Query SELECT * FROM main_menu; 2nd Query (Nested In While Loop) SELECT * FROM sub_menu WHERE main_menu_id = $looped_id;

Categories : PHP

Is it possible to create a batch file that will call another batch file at some point and also supply it with a sequence of inputs
To call another batch file, I refer this link: Several ways to call a windows batch file from another one or from prompt. Which one in which case? To get user inputs: Echo off set /p x=path name: echo path is %x% pause

Categories : Batch File

How to get menu item id on action bar when other menu item clicked
As per you logcat, you getting class cast exception and you have used sharlockactionbar. so try and check if you have imported the correct MenuItem and Menu which should like this: import com.actionbarsherlock.view.MenuItem; and import com.actionbarsherlock.view.Menu; instead of import android.view.MenuItem; and import android.view.Menu; Edit: Here is how you can change both icons on just a single click: private Menu menu; private MenuItem item1, item2; Boolean original = true; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { getSupportMenuInflater().inflate(R.menu.menu, menu)

Categories : Android

Show previous visited drop down menu item color different than other menu items.
If I understand your question correctly then you want to use the :visited selector in your css. Hard to give specifics without you providing some code, but this is the general idea: a:visted { color: orange; } You can go Here for an example. That link also contains examples for other related selectors which might be useful to you, such as :hover

Categories : CSS

Keeping the accordion menu open to show selected menu item
The initMenu() function, should look like this: function initMenu() { $(".sub-menu").hide(); $(".current_page_item .sub-menu").show(); $('#menu li a').click( function() { var checkElement = $(this).next(); if ((checkElement.is('ul')) && (checkElement.is(':visible'))) { checkElement.slideUp('normal'); return false; } if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#menu ul:visible').not(checkElement.parentsUntil('#menu')).slideUp('normal'); checkElement.slideDown('normal'); return false; } }); $('.current-menu-item').parentsUntil('#menu').slideDown('normal'); var FullCurrentURL = window.location.href; var CurrentURLparts = FullCurrentURL.split("/"); var CurrentURLindex = CurrentURLparts.lengt

Categories : Misc

jQuery current-menu-item-highlight in tandem with js anylink menu
This should help: In menucontents.js change make the following changes: anylinkmenuINDIA={divclass:'anylinkmenu' // to anylinkmenuINDIA={divclass:'anylinkmenuINDIA' anylinkmenuPROJECTS={divclass:'anylinkmenu' // to anylinkmenuPROJECTS={divclass:'anylinkmenuPROJECTS' and so on. Basically, make the divclass the same as the object name. Then update anylinkmenu.css so that your new classes will be styled properly. Line 14 would become: .anylinkmenuINDIA, .anylinkmenuPROJECTS, /* your other classes here */ { Then you can use this: $(document).ready(function () { var loc = window.location.href.replace(window.location.hash, ''); $('#bcp-nav a, div[class^="anylinkmenu"] a').each(function (index) { if (this.href.trim() == loc) { var linkClass = $(this).closest(

Categories : Javascript

Clicking on a list item containing sub menu in a drop down menu, closes the rest but doesn't expand the new one
Made a little change here: http://jsfiddle.net/JWMarchant/nUrjy/7/ Simplified the code to this: $('#main-navigation a').click(function (e) { /* Finding the drop down list that corresponds to the current section: */ var dropdownMenu = $(this).next(); if ($(this).parent('li').children('.sub-menu').length > 0) { $('.sub-menu').not(dropdownMenu).not(dropdownMenu.parents()).slideUp('fast'); $(dropdownMenu).slideToggle('fast'); } });

Categories : Javascript

Windows Phone 8 - Adding a menu item to a media library item
I found a solution for the problem :) http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff967563(v=vs.105).aspx this is what i wanted :)

Categories : Windows Phone 8

How to change the colour of of a main menu item, when submenu item is hovered
I could be missing something here as I haven't actually seen your markup, (no offense but I'm not visiting your site to look for it) but you could update your CSS to something like this: nav li.active.parent > a, nav li:hover > a { background-image: url(http://horyzon.de/images/images/navbg.png); color: #FFF; }

Categories : HTML

Editing list Item using drop down menu bootstrap when clicking on an item
Use this JavaScript code: $(function() { $('#changeEN').hide(); $('.newDropdownLanguage li').click(function(e) { e.preventDefault(); $('#current-language').text($(this).text()); $('.newDropdownLanguage li').show(); $('#changeEN').show(); // Actually it should work without this line, but I don't get why it is not working. $(this).hide(); }); }); Don't forget to add one <li> for English: <li><a id="changeEN" href="#">English</a></li>

Categories : Javascript

Bootstrap 3 Hide Dropdown Menu on Menu Item Click
Change this: $(document).ready(function () { $("#navbar li a").click(function(event) { // check if window is small enough so dropdown is created $("#navbar-toggle").is(":visible") $("#nav-collapse").toggle(); }); }); to this: $(document).ready(function () { $("#navbar li a").click(function(event) { // check if window is small enough so dropdown is created $("#nav-collapse").removeClass("in").addClass("collapse"); }); }); See http://jsfiddle.net/fw7vh/4/

Categories : Jquery

C# mvc get active menu item with menu items from partial controller
i think you can access the parent controller using the ParentActionViewContext property on htmlHelper.ViewContext string currentController = htmlHelper.ViewContext.ParentActionViewContext.RouteData.GetRequiredString("controller");

Categories : C#

Sub menu wont show when menu item hovered over (css html)
Pretty easy. The submenu ul#sub-menu is not a child of the anchor element, but of the list element. You must either put the submenu inside the anchor element or check for the hover on the list element as following: ul#nav-1 li:hover > ul#sub-menu { instead of ul#nav-1 li a:hover > ul#sub-menu { http://jsfiddle.net/ULSsa/2/

Categories : HTML

jquery mobile menu to close after i click a menu item
Add an extra event to make it happen. You could trigger the click of #menu-icon when some menu item is clicked: $("#nav").on("click", "li", function () { $("#menu-icon").click(); //or $("#nav").slideToggle(); }); Demo : http://jsfiddle.net/hungerpain/RtMNj/2/

Categories : Jquery

Collapse or hide CSS dropdown menu when a menu item is clicked
You can hide the menu when the mouse leaves by using the .mouseleave method. If you want to hide the menu when an item is clicked, you can add this to your code, in the <head> tag preferably. The following code is in jQuery: $(function(){ $("a").click(function(){ $("#menu").hide(); //or $("#menu").slideUp() if you want it to slide up instead of just disappearing. }); }); This tells the browser to close menu whenever a link is clicked. If you have other links in your web-page text, the you could include the menu links in a class, and use the class instead. For example: <ul id="menu"> <li><a href="#" class="mitem">Item 1</a></li> </ul> And then the jQuery code would be: $(function(){ $(".mitem").click(function(){

Categories : Jquery

Determine if menu item becomes an overflow, then show a mobile menu
Specify the ids for the menues' divs (e.g. desktopMenu and mobileMenu), like this: <div id="desktopMenu" style="overflow:hidden; width: 100%;"> And this: <div id="mobileMenu" class="dropdown_menu"> And use the following script: var desktopMenu = document.getElementById('desktopMenu'), mobileMenu = document.getElementById('mobileMenu'); desktopMenu.style.display = 'none'; mobileMenu.style.display = 'none'; if (desktopMenu.offsetHeight < desktopMenu.scrollHeight || desktopMenu.offsetWidth < desktopMenu.scrollWidth) { mobileMenu.style.display = 'block'; } else { desktopMenu.style.display = 'block'; } It hides both menues by default, and then determines if the desktopMenu div is overflowing. If it is, it shows the mobile menu, and if it's not, it shows the

Categories : Javascript

css dropdown sub menu not dropping under parent menu item
You just need a couple small changes to make the nested uls appear relative to their parent li: nav li { display: inline; position: relative; } nav li ul { display: none; position: absolute; padding: 0; }

Categories : HTML

How to add a responsive tab menu and shrink li menu item Bootstrap?
Wrap zozo tabs in a div and give it 100% with like so: <div class="tab-wrapper dropdown-menu"> zozo tabs here.... </div> The rest of the issue is related to twitter nav menu. The sub menu show on hover which is inside ul and you have added zozo tabs inside a div. /*hide by default*/ .tab-wrapper{ display: none; width: 980px; left: -492.5px; } /*display on hover sub menu*/ .navbar ul.nav li:hover > .tab-wrapper { display: block; } Now there will be some issue with default tab since the whole elements display is set to none. Update: added class tab-wrapper and replaced the css style. Update 2 I realized that your menu is absolute positioned. So added the same class the to div dropdown-menu which will make it absolute from your style and added some mo

Categories : Jquery

How can I add a custom menu item to an existing Wordpress menu?
You dont need to add filters and hooks for this. You can edit your navigation in your theme files, usually it's in the header.php file. Add a new list item with your icon or text and put the link for it. Plain HTML.

Categories : PHP

highlight main menu item when sub item is open
Get the link of the page you are currently one : var pathname = window.location.pathname; or $(location).attr('href'); via How to get the current URL in jQuery? then search in the menu for the a having the href equal with "pathname" and add the ".active" class! $('a[href$="ABC"]'). $(function(){ var actlink = $(location).attr('href'); $('a[href$="actlink"]').parent("li").addClass('active'); }) or $(function(){ var actlink = $(location).attr('href'); $('ul > li > a[href$="actlink"]').parent("li").addClass('active'); }); Don't know for sure it works. Haven't tested it!

Categories : Jquery

Main navigation item not as wide as sub-menu item
I'm guessing that you want the menu "buttons" to be the same width as the drop-down parts, right? The problem is that the drop-down ul is positioned absolutely, so the parent li doesn't take into account its dimensions. Currently you're doing this: <div class="sixteen columns"> <ul> <li> <a href="#" style="display:inline-block; position:relative;">Dropdown Menu Header</a> <ul style="display:block; position:absolute;"> <li>Dropdown Item 1</li> <li>Dropdown Item 2</li> <li>Dropdown Item 3</li> </ul> </li> </ul> </div> Instead of using an unordered list for the dropdown, use a definition

Categories : HTML

How to hide item from menu and show another item :Android
You must do this programmatically like here add: Dynamic control of action/menu items in ActionBar, delete: How do I hide a menu item in the actionbar?, you could use a flag and then call invalidateOptionsMenu() to update the changes you made on the Menu items, i don't have an example right now but i think with this explanation you should achieve what you are trying to do. Another way could be add both MenuItem in method onCreateOptionsMenu (or directly via UI XML) and then in method onPrepareOptionsMenu hide the edit button and show the save button with setVisible() method update with the method mentioned before, sorry for my english, still learning it.

Categories : Android

how to load next item from directory on menu item click?
Read the file contents into a List or array. Maintain some kind of int value that points to the current element begin shown. When you're ready to move to the next element, increment the int value, perform appropriate edge checks and update the display as required. Updated with simple example This is a basic example. It scans a specified directory into a List and maintains a int index of the current file. When the next menu item is actioned, it simple increments the int index value and updates the display import java.awt.BorderLayout; import java.awt.EventQueue; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.swing.JFram

Categories : Java

Menu item won't show context menu
Maybe i do not understand your question (my english is not... anything special):D But this should work if you just want multilevel contextmenu: <ContextMenu> <MenuItem Header="Top Level 1"> <MenuItem Header="Sub Level" /> <MenuItem Header="Sub Level" /> </MenuItem> <MenuItem Header="Top Level 2"> <MenuItem Header="Sub Level" /> <MenuItem Header="Sub Level" /> </MenuItem> </ContextMenu>

Categories : C#

Active menu-item in a Express menu
If you are just wanting to do a simple regex to verify part of the path, a pretty basic one would just be li(class = path.match(/^/id/admin$/) ? "active" : "") //string has to end with "admin" a(href='/id/admin', title='admin') Admin li(class = path.match(/^id/admin/services/) ? "active" : "") a(href='/id/admin/services', title='services') Services li(class = path.match(/^/id/admin/staff/) ? "active" : "") a(href='/id/admin/staff', title='staff') Staff which would match the admin exactly, and then the other two it would simply look for those patterns at the beginning of the path string. This is also assuming you are passing the path from Express to the Jade template to render.

Categories : Javascript

How to add a menu item in Windows right-click menu
You need to write a shell extension for Windows Explorer. This extension will execute in the Explorer.exe process and previously it was not recommended to implement the extension using .NET because only one version of the .NET runtime could be loaded into Explorer.exe process. However, in .NET 4 it is possible to load multiple version of the .NET runtime within the same process making it possible to write shell extensions using .NET. For more information you can read the article How to Write Windows Shell Extension with .NET Languages on Code Project.

Categories : C#

GTK3 Update Menu bar and menu item
Just do it. You don't need to wrap a simple integer in all the GTK+ object and event machinery; if you know when the value changes, you can just compute a new label text for the menu item and set it (using gtk_menu_item_set_label()).

Categories : C

Item space between in menu item is not working in asp.net
You can use CSS Selectors to achieve that In your code you have asigned the CssClass attribute to your Menu control. Make use of that CSS class called "menu" and override it in your page (you can move it later to a css file). So add this to your page in the <head> <style type="text/css"> .menu li ~ li { padding-left: 100px; /* selects every <li> element that are preceded by a <li> element. */ list-style:none; } .menu ul > li:first-child { font-size:20px;/* this one will select the first element of your menu */ } </style> Please note that I added the .menu ul > li:first-child selector so you will not get a left padding on the first element of the menu, I just changed the font-size to give you an example

Categories : C#

xml to yaml: You cannot define a sequence item when in a mapping in
You have a completely wrong syntax ... please read the documentation i.e. how to use setter injection with YAML. arguments: [%sonata.news.admin.post.entity%] arguments: [%sonata.news.admin.post.controller%] should be arguments: [%sonata.news.admin.post.entity%, %sonata.news.admin.post.controller%] ... further call: - {method: setUserManager} service: fos_user.user_manager ... should be calls: - [setUserManager, ["@fos_user.user_manager"]]

Categories : Xml

How to hide one item(Button) and show another item(Button) from menu (Buttons in ActionBar) in single Activity
Try this, public boolean checkHide = false @Override public boolean onOptionsItemSelected(MenuItem item){ switch(item.getItemId()){ case EDIT: if(checkHide){ checkHide=false; item.setTitle("edit"); // ToDo your function } else{ checkHide=true; item.setTitle("save"); // ToDo your function } }

Categories : Android

How to select a menu item at run item?
private void button1_Click(object sender, EventArgs e) { MenuItem myItem = Menu1.Items[0]; } i put 0 u can choose other index depending on what you need. or... MenuItem myitem = Menu1.SelectedItem; thank you,here is one more way foreach (MenuItem c in Menu1.Items) { if (c.SomePropertyYouNeed == SomeOtherThingYouNeedToCheck) { //your logic here } }

Categories : C#

Error reproducing demo "You cannot define a sequence item when in a mapping"
In your type class change line ->add('dueDate', null, array('mapped' => false)) to ->add('dueDate', null, array()) Your dueDate filed is indeed mapped

Categories : PHP

TypeError: sequence item 0: expected string, list found
Except one case(344670 ['']) the value of v is always a list of lists, so you need to use a nested list comprehension to flatten the list first. with open('cherrypick_list.txt', 'w') as f: for k,v in dic.items(): val = [item if isinstance(item, str) else " ".join(item) for item in v ] f.write("{} {} ".format(k,val)) Get unique items: val = [item if isinstance(item, str) else " ".join(item) for item in v ] seen = set() val = [x for x in val if x not in seen and not seen.add(x)]

Categories : Python

How to iterate over array in batch for key=value item
It wasn't very clear what you wanted to do. Try and see if this solves your problem: @echo off setlocal enabledelayedexpansion set LIST=(a b c d e) set a=value of A set b=value of B set c=value of C set d=value of D set e=value of E :: deletes the parentheses from LIST set _list=%LIST:~1,-1% for %%G in (%_list%) do ( set _name=%%G set _value=!%%G! echo !_name! = !_value! ) the script prints the name and the corresponding value of all the environment variables whose names are listed in the variable LIST.

Categories : Arrays

Automatic menu creation for BATCH files
Your question inspired me... @ECHO OFF REM Below section is not to be executed, is just database, so it is commented. REM It is beginning with "REM D;" because batch code will scan itself REM and identify "REM D" as database entries (as well as "REM DE" as database end). REM Database entries (format "REM D";Title;(m)enu/(d)isk;target;parent) REM D;Windows Client;m;Client REM D;Windows Server;m;Server REM D;Server Data Center (no GUI);d;14;2008 REM D;Server Enterprise Core (no GUI);d;15;2008 REM D;Server Standard Core (no GUI);d;16;2008 REM D;Server Data Center;d;17;2008 REM D;Server Enterprise;d;18;2008 REM D;Server Standard;d;19;2008 REM D;Server Data Center;d;20;2012 REM D;Server Data Center Core (no GUI);d;21;2012 REM D;Server Standard;d;22;2012 REM D;Server Standard Core (no GUI);d;23

Categories : Windows

How to create custom item reader in spring batch
If you already have a list then you can just create an instance of IteratorItemReader. List<MyClass> myClassList = myClassDao.list(...) ItemReader reader = new IteratorItemReader(myClassList);

Categories : Java



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.