Search Results

Search found 21 results on 1 pages for 'kin'.

Page 1/1 | 1 

  • WinMo’s Demise: Notifying Next of “Kin”

    - by andrewbrust
    This past Monday, April 12th, Visual Studio 2010 was launched.  And on that same day, Microsoft also launched a new line of  mobile phone handsets, called Kin.  The two product launches are actually connected, but only by what they do not have in common, and what they commonly lack. On the former point: VS 2010 had released to manufacturing a couple weeks prior to its launch.  The Kin phones, meanwhile are not yet available.  We don’t even know what they will cost.  (And I think cost will be a major factor in Kin’s success…I told ChannelWeb’s Yara Souza so in this article). What do the two products both lack? Simple: Windows Mobile 6.x. For example, Kin seems to be based on the same platform as Windows Phone 7 (albeit a subset).  And VS 2010 does not support .NET Compact Framework development, which means no .NET development support for WinMo 6.x and earlier. So I guess April 12th marks Windows Phone “clean slate day.”  If you want to develop for the old phone platform, you will need to use the old version of Visual Studio (i.e. 2008).  Luckily VS 2010 and 2008 can be installed side-by-side.  But I doubt that’s much consolation to developers who still target WinMo 6.5 and earlier. Remember, WinMo isn’t just about the phone.  There are all sorts of non-telephony mobile devices, including ruggedized Pocket PC-style instruments, bar code readers and shop-floor-deployed units that don’t run Windows Phone 7 and couldn’t, even if they wanted to. Where will developers in these markets go?  I would guess some will stick with WinMo 6.x and earlier, until Windows Phone 7 can handle their workloads, assuming that does indeed happen.  Others will likely go to Google’s Android platform. For OEMs and developers who need a customizable mobile software stack, Android is turning out to be out-WinMo-ing WinMo.  As I wrote in this post, Google took Microsoft’s model (minus the licensing fees) and combined it with a modern SmartPhone feature set (rather than a late 90s/early oughts PDA paradigm), to great success.  You might say Google embraced and extended. You might also say Microsoft shunned and withdrew.

    Read the article

  • Cinnamon install problem ubuntu 12.04

    - by Kin.
    I was following the How do I install the Cinnamon Desktop?, but when i install, it like this locahost@locahost:~$ sudo apt-get install cinnamon Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: cinnamon : Depends: libgjs0- E: Unable to correct problems, you have held broken packages. How can i install the libgjs0- package?

    Read the article

  • Cinnamon cannot install due to libbgjs0 dependency

    - by Kin.
    I was following the How do I install the Cinnamon Desktop?, but when i install, it like this locahost@locahost:~$ sudo apt-get install cinnamon Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: cinnamon : Depends: libgjs0- E: Unable to correct problems, you have held broken packages. How can i install the libgjs0- package?

    Read the article

  • How to determine which inheriting class is using an abstract class' methods.

    - by Kin
    In my console application have an abstract Factory class "Listener" which contains code for listening and accepting connections, and spawning client classes. This class is inherited by two more classes (WorldListener, and MasterListener) that contain more protocol specific overrides and functions. I also have a helper class (ConsoleWrapper) which encapsulates and extends System.Console, containing methods for writing to console info on what is happening to instances of the WorldListener and MasterListener. I need a way to determine in the abstract ListenerClass which Inheriting class is calling its methods. Any help with this problem would be greatly appreciated! I am stumped :X Simplified example of what I am trying to do. abstract class Listener { public void DoSomething() { if(inheriting class == WorldListener) ConsoleWrapper.WorldWrite("Did something!"); if(inheriting class == MasterListener) ConsoleWrapper.MasterWrite("Did something!"); } } public static ConsoleWrapper { public void WorldWrite(string input) { System.Console.WriteLine("[World] {0}", input); } } public class WorldListener : Listener { public void DoSomethingSpecific() { ConsoleWrapper.WorldWrite("I did something specific!"); } } public void Main() { new WorldListener(); new MasterListener(); } Expected output [World] Did something! [World] I did something specific! [Master] Did something! [World] I did something specific!

    Read the article

  • C# Proxy using Sockets, how should I do this?

    - by Kin
    I'm writing a proxy using .NET and C#. I haven't done much Socket programming, and I am not sure the best way to go about it. What would be the best way to implement this? Should I use Synchronous Sockets, Asynchronous sockets? Please help! It must... Accept Connections from the client on two different ports, and be able to receive data on both ports at the same time. Connect to the server on two different ports, and be able to send data on both ports as the same time. Immediately connect to the server and start forwarding packets as soon as a client connection is made. Forward packets in the same order they were received. Be as low latency as possible. I don't need the ability for multiple clients to connect to the proxy, but it would be a nice feature if its easy to implement. Client --------- Proxy ------- Server ---|-----------------|----------------| Port <-------- Port <------- Port Port <-------- Port <------- Port

    Read the article

  • C# Proxy, what is the best way to do this?

    - by Kin
    I'm writing a proxy using .NET and C#. It has a couple of functions that it needs to fulfill. I haven't done much Socket programming, and I am not sure the best way to go about it. Should I use Synchronous Sockets, Asynchronous sockets? Please help! It must... Accept Connections from the client on two different ports, and be able to receive data on both ports at the same time. When a connection is made on a port, it must immediately connect to the server, and start sending data as it receives it from the client to the server. Packets must be forwarded in the order they are received, exactly as they were received. It needs to be as low latency as possible. I don't need the ability for multiple clients to use the proxy, but it would be a nice feature if its easy to implement.

    Read the article

  • How to determine which inheriting class is using an abstract class's methods.

    - by Kin
    In my console application have an abstract Factory class "Listener" which contains code for listening and accepting connections, and spawning client classes. This class is inherited by two more classes (WorldListener, and MasterListener) that contain more protocol specific overrides and functions. I also have a helper class (ConsoleWrapper) which encapsulates and extends System.Console, containing methods for writing to console info on what is happening to instances of the WorldListener and MasterListener. I need a way to determine in the abstract ListenerClass which Inheriting class is calling its methods. Any help with this problem would be greatly appreciated! I am stumped :X Simplified example of what I am trying to do. abstract class Listener { public void DoSomething() { if(inheriting class == WorldListener) ConsoleWrapper.WorldWrite("Did something!"); if(inheriting class == MasterListener) ConsoleWrapper.MasterWrite("Did something!"); } } public static ConsoleWrapper { public void WorldWrite(string input) { System.Console.WriteLine("[World] {0}", input); } } public class WorldListener : Listener { public void DoSomethingSpecific() { ConsoleWrapper.WorldWrite("I did something specific!"); } } public void Main() { new WorldListener(); new MasterListener(); } Expected output [World] Did something! [World] I did something specific! [Master] Did something! [World] I did something specific!

    Read the article

  • Javascript: find array by name

    - by Kin
    Hi, I have some js arrays and I want to find the arrays by name. for example: arr1 = [1,2,3]; arr2 = [3,4,5]; And access them like this: var intNum = 2; var arrName = 'arr' + intNum; arrName[0]; // equals 3 Is this possible? Thanks, Kevin

    Read the article

  • Correcting Grammar for Microsoft Products and Technology

    I see book authors, editors, bloggers, press, team members, and occasionally even a VP misspell our products, technologies, and features that I thought I would build and maintain a list of the correct capitalization and spelling of the most commonly misspelled Microsoft products and technologies. Sources: Internal site (brandtools) and the Microsoft Trademarks Web site. Last updated: April 27, 2010   Incorrect Correct .net or .Net .NET .Net framework 4.0, .NET framework 4.0 .NET Framework AdCenter, Ad Center, Adcenter adCenter Ado.net, ADO.Net ADO.NET Asp.net, ASP.Net ASP.NET Asp.Net ajax, Asp.NET Ajax ASP.NET AJAX Asp.Net Mvc ASP.NET MVC Biz Spark, Bizspark BizSpark Clear Type, Clear type, Cleartype ClearType Directaccess, Direct Access DirectAccess Direct Show, Directshow DirectShow Direct X DirectX Dream Spark, Dreamspark DreamSpark Home Group, Home group HomeGroup HotMail, Hot Mail Hotmail Info Path, Infopath InfoPath Intellisense, Intellisense IntelliSense Iron Ruby IronRuby Kin KIN Linq LINQ MSN Messenger Windows Live Messenger One Note, Onenote OneNote Open type, Opentype OpenType PlayTo, Play to Play To Power Point, Powerpoint PowerPoint Powershell, Power Shell PowerShell Sea Dragon, Seadragon SeaDragon Sharepoint, Share Point SharePoint Silver Light, SilverLight Silverlight Skydrive, Sky Drive SkyDrive Sql Server SQL Server Visual Basic .net (the .net was removed in the 2005 version) Visual Basic  Visual C# Express 2010 or Visual Basic Express 2010 or Visual C++ Express 2010 Visual version 2010 Express as in Visual C# 2010 Express, Visual Basic 2010 Express Visual Studio 2010 Team Foundation Server Visual Studio Team Foundation Server 2010 Visual Studio Ultimate 2010 or Visual Studio Professional 2010 Visual Studio 2010 version, as in Visual Studio 2010 Ultimate, Visual Studio 2010 Professional WebSite Spark, Website spark Website Spark Win 32 Win32 Windows Mobile (except when referring to previous versions like 5.0 or 6), Windows phone 7 Series Windows Phone Xaml XAML XBOX, xbox Xbox Xbox Live, XBOX Live Xbox LIVE   Caveats These guidelines dont apply to URLs (ex: www.asp.net) or to code namespaces, variables, and classes should follow the .NET Framework naming guidelines. This list only covers capitalization/spacing rules, it doesnt cover the correct usage of (tm) or symbols or the correct word usage rules. For those, refer to the trademark Web site. Also note that I have no idea why we are so inconsistent say on keeping features/brands two words versus one word or the order of product/version/year.Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Castle Interceptor Live Cycle and Memory Leak

    - by ktutnik
    Hello all, im new to castle dynamic proxy, and a bit curious.. when creating proxy of my object i save all the original value of its property on the interceptor (class scope) using dictionary and return the new value. now i wandering, when will this data get collected by GC?? can i control it or depends on the interceptor live cycle? Regards Kin

    Read the article

  • [C++] OpenID lib in C++?

    - by Jonathan
    Hi I need to use openid in a c++ website and can't find a working library to work with. I am trying to use this one http://kin.klever.net/libopkele/requirements but it stops the configure with this message: checking for OPENSSL... configure: error: no openssl library found. get one from http://www.openssl.org/ but my debian has openssl installed and libssl-dev libssl installed... any help please? Thanks, Jonathan

    Read the article

  • MOSS 2007 links issue

    - by r0ca
    I have a user that for some reason lost her "My Site" & "My Links" link on her local computer. When she logs into a Citrix server she can see them. I have had her dump temp Internet files and put the site in her trusted sites but nothing is working. I think thins started after some Windows updates but not sure. Any ideas on this one? BTW, it's not turned off kin Central Admin and none of her group memberships have changed.

    Read the article

  • MOSS 2007 links issue

    - by r0ca
    I have a user that for some reason lost her "My Site" & "My Links" link on her local computer. When she logs into a Citrix server she can see them. I have had her dump temp Internet files and put the site in her trusted sites but nothing is working. I think thins started after some Windows updates but not sure. Any ideas on this one? BTW, it's not turned off kin Central Admin and none of her group memberships have changed.

    Read the article

  • Letter to Ballmer: Making Better Consumer Devices

    - by andrewbrust
    Last year, I wrote Steve Ballmer an email, and he was kind enough to write me back.  The email contained a scan of a column I wrote praising Microsoft’s BI strategy.  His reply contained three simple words: “Super nice  thanks.” Well, now I’d like to write to Steve again, in an open letter format, and this time the love may be a bit tougher.  But I’m still super earnest. The past two days have been eventful ones for Microsoft: The company announced the departure of company veterans Robbie Bach and J Allard and the market announced Apple is now besting Microsoft in market capitalization. Plus, announcements were made that make it plain that Ballmer will, in effect, be running Microsoft’s Entertainment & Devices division himself. With that in mind, I’d like to offer my list of a dozen things I think Microsoft’s CEO should do to improve that division’s offerings and, hopefully, its bottom line. So here goes:   1. On Windows Phone 7, Stay the Course The press is teeming with headlines and reader comments proclaiming the death-before-arrival of Windows Phone 7.  That’s plain silly.  You’ve got the makings of a great and unique SmartPhone platform, and you’re the only company (even considering RIM) that can offer full fidelity Exchange integration, not to mention implementing Office on the device.  Let the existing team finish this puppy and ship it. And then have them pump out a few updates, over-the-air, quickly.  Show them that Google Android’s not the only product that can do good, rapid dot releases. And another thing: make sure your OEMs’ devices have flawless touch screens.  If they don’t, then you shouldn’t certify them for delivery to customers.  Period. Oh, and kill the Kin, quietly.  It was DOA, and you know it.   2. Move Media Center to the Xbox Platform Media Center is, at its core, a good product.  But delivering a media distribution and DVR platform on a sophisticated PC operating system like Windows 7 just creates too many moving parts.  Xbox already functions as the best Media Center extender device – it should actually be the hub as well. Media Center is mostly based on .NET code – and XNA is a .NET environment for Xbox – find a way to bridge that small gap and make Media Center a joy to work with instead of a frustration.  Beating Apple TV out of this sub-market is the lowest hanging fruit on the tree (goofy pun, but it’s true).   3. Integrate Media Center with Mediaroom, or Kill the Latter You have two media products with almost identical names.  One is for standalone DVRs and the other is for IPTV cable set tops with DVR capabilities.  Can we merge these please?  My previous request of putting Media Center on Xbox would seem to tie into this nicely, since you’ve announced plans to do that with Mediaroom already.   4. Fix the Red Ring of Death People love the Xbox, but they really don’t love sending their consoles back every 18-24 months, when they get a bunch of red lights flashing on power up.  You’ve handled this defect about as gracefully as possible, but it’s been around for a long time now and it doesn’t seem to be fixed yet.  You can do better.  In fact, you must do better, or you insult your customers.   5. Add Blu Ray to Xbox I know, streaming movies are the future; physical media is legacy technology.  So if that’s true, why did you back HD DVD so hard?  You know why: for now, the film studios won’t allow a large selection of new release, HD, surround sound content be distributed on any medium other than Blu Ray or cable pay per view/on-demand.  Don’t you want home theater buffs to see the Xbox as a fantastic device for their rigs?  Don’t you want to put PlayStation 3 out of its misery?  And if you follow my suggestions above (move Media Center to the Xbox and fix the Red Ring problem), you’d have it all sewn up.  Do I think Blu Ray functionality will move a lot of units?  No.  Do I think that it would move more units with desperately needed influential home theater consumers?  You bet.  And you might sell more ZunePass subscriptions in the process. But while you’re at it, make the fan quieter, please.   6. Make More of Windows Home Server Home Server is a fantastic product.  And for reasons unknown to me, it seems like you’re letting it languish.  Development of the add-in ecosystem seems underfunded.  WHS’ unparalleled ease of use and reliability for home PC backup (and emergency restores) goes unsung.  Product cycles are slow.  Support for your OEMs, who are doing great work, especially in the green space with Atom CPUs, seems lacking.  You’ve married a trophy girl and you keep her cloistered at home!  That’s cruel, unusual and, um, incredibly ill-advised.  Make use of this ace card, and while you’re at it, give it real integration with Media Center.  The integration thus far proof-of-concept quality.  You should go way past that – both products will benefit immeasurably.   7. Set Up a Partner Platform for Custom Installers There’s a whole sub-industry of companies that install, integrate and configure home theater, security and connected home products.  They have an industry group. They are influential in the high-end of the consumer electronics industry, and so are their customers.  They love Media Center and they love Windows Home Server.  But I have talked to several of them at the Consumer Electronics Show and they tell me you don’t love them.  They find it very difficult to do business with Microsoft, even though they want nothing more than to sell and evangelize your platform.  This is a travesty.  Please fix it.  Get Allison Watson and the Microsoft Partner Network on board and have her hire someone who knows how to run a channel program for consumer electronics companies.  Problem solved.  Markets expanded.   8. Make Your Own Hardware In other areas, I know you love your partners.  I help run one, so I appreciate that.  But when it came to Xbox and Zune you built them it yourself (albeit on a contract basis, which is fine).  Windows Phone 7 has a chance to work as an OEM play, but it would work better if you produced the devices.  At least consider building a reference device that sells alongside your OEMs’ offerings.  That’s what Google did with the Nexxus One.  And while that phone was not itself a big seller, it catalyzed two wonderful things : (1) a quality bar was set and (2) partners exceeded it.  Before the Nexxus One, the best Android handset out there was the Motorola Droid. The Nexxus One was better, and the HTC Droid Incredible and Evo 4G are now even better than Google’s phone, which is why Verizon and Sprint decided not to carry it.  Imagine if all Windows Phone 6.x devices were on par with the HTC HD2.  I tend to believe you’d have a lot bigger market share than you do now.   9. Continue with Your Retail Initiative From what I hear, it sounds like it’s going well.  And this goes right along with making your own hardware.  When you build it, they will come.  And then it makes the likes of Best Buy and Staples do better.   10. Make an Acquisition (or Two) TiVo and/or Moxi look ripe for the picking.  With their ability to build stuff people love and your ability to run a business, you might just have something.  But do a better job than you did when you bought Danger.  Buy the ideas, not just the customers, eh?   11. Make Beautiful Stuff You’ve heard this one before, I know.  But I have some head-shrinking advice on this one.  You know that Apple obsesses over its industrial design.  You know that appeals to consumers.  But it seems you think doing so is Apple’s game exclusively and so you shouldn’t even try.  Bull dinky.  Come to New York and visit the Museum of Modern Art’s Architecture and Design gallery.  You’ll see that lots of companies and product categories have had very high design value well before Apple existed.  You can do this, and the Zune HD was a great start.  Now run with that.  Find those negative voices in your head that are telling you that you can’t and shut them up.  For good.   12. Burst the Bubble Some of the products you’ve built seem like they were conceived in a bizarro world.  That would appear to be the result of groupthink.  You must do better.  And there’s lots of people willing to advise you.  This includes just about everyone in the Regional Director program, and probably a bunch of MVPs.  Heck, I bet the guys at Engadget could help out too.  Imagine if you let them see the Kin before it shipped.  Talk to high-end gear consumers.  Talk to Best Buy and CostCo customers too.   Signing Off I hope this was of value to you.  As I wrote this I kept telling myself how obvious, even trite, some of these pieces of advice were and then, because of that, doubting they’d really help.  But I decided that they must not be obvious to Microsoft.  Sometimes when you get wrapped up in stuff, it’s hard to clear your head.  I think my head’s pretty clear here though (I’m wrapped up in other stuff), so maybe my perspective can help.  If not, well, then, I guess they all can’t be super nice.

    Read the article

  • [WPF] Format datagrid row foreground depends on data

    - by ktutnik
    Hi everyone, Im new in wpf, i though it was an easy task. i searched in the internet but not lucky to found any help regarding this problem. <Style TargetType="{x:Type DataGridRow}"> <Setter Property="Foreground" Value="{Binding Converter=conditionToColorConverter}"/> </Style> the problem is how to pass the row data to the value.. the converter will return RED or BLACK color when specified properties of the row data match some category. or maybe there is an easy way to do that? Thanks in advance Kin

    Read the article

  • How to instantiate JQuery UI widget by string?

    - by limcheekin
    Hi there, Do you know how to instantiate JQuery UI widget by string? Let's illustrate it with some sample code. Given the html link element below: <a id="testLink" href="#">Test Link</a> Normally, we can make it into button using code below: $('#testLink').button(); What if I want to instantiate the button with string, for example: var widget='button'; $('#testLink').[widget](); Of course the code block above is not working (It is just for illustration purpose only), otherwise you will not see this question. Please advice. Thanks, Chee Kin

    Read the article

  • JCP.Next - Early Adopters of JCP 2.8

    - by Heather VanCura
    JCP.Next is a series of three JSRs (JSR 348, JSR 355 and JSR 358), to be defined through the JCP process itself, with the JCP Executive Committee serving as the Expert Group. The proposed JSRs will modify the JCP's processes  - the Process Document and Java Specification Participation Agreement (JSPA) and will apply to all new JSRs for all Java platforms.   The first - JCP.next.1, or more formally JSR 348, Towards a new version of the Java Community Process - was completed and put into effect in October 2011 as JCP 2.8. This focused on a small number of simple but important changes to make our process more transparent and to enable broader participation. We're already seeing the benefits of these changes as new and existing JSRs adopt the new requirements. The second - JSR 355, Executive Committee Merge, is also Final. You can read the JCP 2.9 Process Document .  As part of the JSR 355 Final Release, the JCP Executive Committee published revisions to the JCP Process Document (version 2.9) and the EC Standing Rules (version 2.2).  The changes went into effect following the 2012 EC Elections in November. The third JSR 358, A major revision of the Java Community Process was submitted in June 2012.  This JSR will modify the Java Specification Participation Agreement (JSPA) as well as the Process Document, and will tackle a large number of complex issues, many of them postponed from JSR 348. For these reasons, the JCP EC (acting as the Expert Group for this JSR), expects to spend a considerable amount of time working on. The JSPA is defined by the JCP as "a one-year, renewable agreement between the Member and Oracle. The success of the Java community depends upon an open and transparent JCP program.  JSR 358, A major revision of the Java Community Process, is now in process and can be followed on java.net. The following JSRs and Spec Leads were the early adopters of JCP 2.8, who voluntarily migrated their JSRs from JCP 2.x to JCP 2.8 or above.  More candidates for 2012 JCP Star Spec Leads! JSR 236, Concurrency Utilities for Java EE (Anthony Lai/Oracle), migrated April 2012 JSR 308, Annotations on Java Types (Michael Ernst, Alex Buckley/Oracle), migrated September 2012 JSR 335, Lambda Expressions for the Java Programming Language (Brian Goetz/Oracle), migrated October 2012 JSR 337, Java SE 8 Release Contents (Mark Reinhold/Oracle) – EG Formation, migrated September 2012 JSR 338, Java Persistence 2.1 (Linda DeMichiel/Oracle), migrated January 2012 JSR 339, JAX-RS 2.0: The Java API for RESTful Web Services (Santiago Pericas-Geertsen, Marek Potociar/Oracle), migrated July 2012 JSR 340, Java Servlet 3.1 Specification (Shing Wai Chan, Rajiv Mordani/Oracle), migrated August 2012 JSR 341, Expression Language 3.0 (Kin-man Chung/Oracle), migrated August 2012 JSR 343, Java Message Service 2.0 (Nigel Deakin/Oracle), migrated March 2012 JSR 344, JavaServer Faces 2.2 (Ed Burns/Oracle), migrated September 2012 JSR 345, Enterprise JavaBeans 3.2 (Marina Vatkina/Oracle), migrated February 2012 JSR 346, Contexts and Dependency Injection for Java EE 1.1 (Pete Muir/RedHat) – migrated December 2011

    Read the article

  • Can one config LDAP to accept auth from ssh-agent instead of from Kerberos?

    - by Alex North-Keys
    [This question is not about getting your LDAP password to authenticate you for SSH logins. We have that working just fine, thank you :-) ] Let's suppose you're on a Linux network (Ubuntu 11.10, slapd 2.4.23), and you need to write a set of utilities that will use ldapmodify, ldapadd, ldapdelete, and so on. You don't have Kerberos, and don't want to deal with its timeouts (most users don't know how to get around this), quirks, etc. This resolves the question to one of where else to get credentials to feed to LDAP, probably through GSSAPI - which technically doesn't require Kerberos despite its dominance there - or something like it. However, nearly everyone seems to have an SSH agent program, complete with its key cache. I'd really like an ssh-add to be sufficient to allow passwordless LDAP command use. Does anyone know of a project working on using the SSH agent as the source of authentication to LDAP? It might be through an ssh-aware GSSAPI layer, or some other trick I haven't thought of. But it would be wonderful for making LDAP effortless. Assuming I haven't just utterly missed a way to use ldapmodify and kin without having to type my LDAP passwords - using -x is NOT acceptable. At my site, the LDAP server only accepts ldaps connections, and requires authentication for modifying operations. Those are requirements, of course. Any ideas would be greatly appreciated. :-)

    Read the article

  • jQuery hover menu not disappearing

    - by Nathan Loding
    I have a basic menu using some nested UL's, which is pretty standard I think. When hovering over an LI from the "root" menu, I want the UL within that LI to display. Move the mouse off or to another LI, it shows that submenu. Move down to the submenu and it stays while you hover over each element. I had it working with a simple jQuery.hover() set, but then I ran into issues. When on a page, the "root" menu item is given a class of 'current-page' and if that class exists, I want it to display that submenu statically after a mouseout. Hope I explained that well enough. I just tossed a variable into the hover functions so on the mouseout it ran a .show() on the current-page's submenu. Easy. Except that when I move the mouse between the individual LI's of the submenu, it changes back to the current-page submenu. So I attempted to add a timer element based on another question here. That made things worse -- now the submenus just don't disappear. Here's my CSS, markup, and JS ... how the heck do I make this work properly? Markup: <div id="menu"> <div id="navbar"> <ul id="firstmenu"> <li> <a href="http://localhost/site/pageone">page one</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagetwo">barely there</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li class="current-page"> <a href="http://localhost/site/pagetwo">kith & kin</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagethree">focal point</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagefour">products</a> <ul class="submenu"> <li><a href="http://localhost/site/pageone/subone">subone</a></li> <li><a href="http://localhost/site/pageone/subtwo">subtwo</a></li> <li><a href="http://localhost/site/pageone/subthree">subthree</a></li> <li><a href="http://localhost/site/pageone/subfour">subfour</a></li> <li><a href="http://localhost/site/pageone/subfive">subfive</a></li> </ul> </li> <li> <a href="http://localhost/site/pagefive">clients</a> </li> </ul> </div></div> And here's the CSS: #navbar { margin: 0; padding: 0; border: 0; text-align: center; } #firstmenu { margin: 6px auto 0 auto; font-size: 16px; list-style-type: none; letter-spacing: -1px; } #firstmenu li { display: inline; position:relative; overflow: hidden; text-align: center; margin-right: 10px; padding: 5px 15px; } #firstmenu a { text-decoration: none; outline: none; color: black; font-weight: 700; width: 75px; cursor: pointer; } .current-page { color: white; background: url(../images/down_arrow.png) bottom center no-repeat; } .current-page a { color: white; border-bottom: 1px solid black; } #firstmenu .current-page a { color: white; } #firstmenu li.hover { color: white; background: url(../images/down_arrow.png) bottom center no-repeat; } #firstmenu li.hover a { color: white; border-bottom: 1px solid black; } #firstmenu li ul li.hover { color: white; background: none; } #firstmenu li ul li.hover a { color: white; border-bottom: none; text-decoration: underline; } #firstmenu li ul { width: 900px; color: white; font-size: .8em; margin-top: 3px; padding: 5px; position: absolute; display: none; } #firstmenu li ul li { list-style: none; display: inline; width: auto; } #firstmenu li ul li a { color: white; font-weight: normal; border: none; } .sub-current-page { font-weight: bold; text-decoration: underline; } #firstmenu li ul li.sub-current-page a { font-weight: bold; } And lastly, my not-at-all-working JS (this is in a $(document).ready(), of course): // Initialize some variables var hideSubmenuTimer = null; var current_page; $('.current-page ul:first').show(); // Prep the menu $('#firstmenu li').hover(function() { // Clear the timeout if it exists if(hideSubmenuTimer) { clearTimeout(hideSubmenuTimer); } // Check if there's a current-page class set if($('li.current-page').length > 0) { current_page = $('li.current-page'); } else { current_page = false; } // If there's a current-page class, hide it if(current_page) { current_page.children('ul:first').hide(); } // Show the new submenu $(this).addClass('hover').children('ul:first').show(); }, function(){ // Just in case var self = this; // Clear the timeout if it exists if(hideSubmenuTimer) { clearTimeout(hideSubmenuTimer); } // Check if there's a current-page class set if($('li.current-page').length > 0) { current_page = $('li.current-page'); } else { current_page = false; } // Set a timeout on hiding the submenu hideSubmenuTimer = setTimeout(function() { // Hide the old submenu $(self).removeClass('hover').children('ul').hide(); // If there's a current-page class, show it if(current_page) { current_page.children('ul:first').show(); current_page.css('color', 'white'); } }, 500); }); So what am I doing so wrong? As a side note, I'm using the $('.current-page ul:first').show() because if I gave .current-page any "display" setting in the CSS, it positioned it really weirdly on the page.

    Read the article

1