SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Binding two onblur events

  1. #1
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Binding two onblur events

    How can I bind two on blur events?

    I have a link that has a UL drop down. When I click off of both the link and the UL I want the drop down to disappear. Right now it only disappears after I click off of the link.

    Code JavaScript:
    allLinks[i].onblur = function()
    {
    	var divId 			= this.id.substr(10);
    	var list 			= document.getElementById('identifier_' 	+ divId);
    	var uncompleted 	= document.getElementById('uncompleted_' 	+ divId);
    	var on_hold 		= document.getElementById('on_hold_' 		+ divId);
    	var cancelled 		= document.getElementById('cancelled_' 		+ divId);
    	var completed 		= document.getElementById('completed_' 		+ divId);
     
    	removeClass(list, 'block');
     
    }

  2. #2
    SitePoint Evangelist smftre's Avatar
    Join Date
    Dec 2008
    Location
    London
    Posts
    434
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have an example url for this?
    Web Development London UK We make web 3.0 applications
    SiteInfo See how a website is doing compared to it's competitors
    Statvoo.com The Website Traffic Monitor -
    The best way to monitor traffic to your sites for free!

  3. #3
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by smftre View Post
    Do you have an example url for this?
    Unfortunately it's an internal page.

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2010
    Posts
    167
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by smftre View Post
    Do you have an example url for this?
    Here is a JS Fiddle of my issue. I can't make the menu disappear when onbluring both the menu and the button.

    Edit this Fiddle - jsFiddle - Online Editor for the Web (JavaScript, MooTools, jQuery, Prototype, YUI, Glow and Dojo, HTML, CSS)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •