Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-16 Thread Jonathan Sharp

That's exactly what I was trying to find but like you said I couldn't find
any links to it.

Thanks!
-Jonathan


On 1/15/07, Aaron Heimlich [EMAIL PROTECTED] wrote:


On 1/15/07, Jonathan Sharp [EMAIL PROTECTED] wrote:

  Is jQuery's even object that gets passed in standard or would I have
 to code around W3C/IE target vs. srcElement?


jQuery does some basic normalization to ensure the event object you
receive complies with the W3C DOM2 Spec (and yes, event.target vs.
event.srcElement is one of them). See
http://docs.jquery.com/Events_%28Guide%29 for more info (Note: there don't
seem to be any pages linking here[1]. I actually had to search to find it).

There's also the fix_events plugin which does some more extensive
normalization: http://jquery.com/dev/svn/trunk/plugins/fix_events/fix_events.js


[1]
http://docs.jquery.com/index.php?title=Special:Whatlinksheretarget=Events_%28Guide%29

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-16 Thread Jörn Zaefferer
Aaron Heimlich schrieb:
 jQuery does some basic normalization to ensure the event object you 
 receive complies with the W3C DOM2 Spec (and yes, event.target vs. 
 event.srcElement is one of them). See 
 http://docs.jquery.com/Events_%28Guide%29 for more info (Note: there 
 don't seem to be any pages linking here[1]. I actually had to search 
 to find it). 
The plan is to add mouse and keyboard normalization to jQuery core and 
the offset stuff to the dimensions plugin, and documenting that stuff on 
the page. I also want to document the guts of jQuery's event system 
there, there is so much work to do...

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-15 Thread agent2026

Looks good, but any link in the menus opens two tabs for me (duplicates) in
FF2.

Adam

-- 
View this message in context: 
http://www.nabble.com/-plugin--jdMenu---Finally-Released%21-tf2967558.html#a8369520
Sent from the JQuery mailing list archive at Nabble.com.


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-15 Thread Jonathan Sharp

On 1/13/07, Jörn Zaefferer [EMAIL PROTECTED] wrote:


Jonathan Sharp schrieb:
 I finally got around to finishing the pages and packaging the plugin
 last night. Enjoy!

 http://jdsharp.us/code/jQuery/plugins/jdMenu/
Great to see an update to this plugin!

Have you considered or tried an event delegation approach? That is,
assign the click handlers to the entire menu instead of each li, and use
the event's target property then. You'd have less event handlers, though
more code to figure what to do when the event is fired. And you can add
and remove as many elements as you like, there would be no need to un-
or rebind any event handlers.



I'd be very interested in this approach. Is jQuery's even object that gets
passed in standard or would I have to code around W3C/IE target vs.
srcElement? I would assume that I'd just need to attach a top level event to
my root UL. I'll see what I can refactor. I'm testing 1.1 with our
application today and so far hasn't been any major changes.

For 1.1 compability, I think the only thing you have to change is

ancestors() to parents().



I've made these changes locally, works great with 1.1.

Maybe we should move ancestorsUntil (or rather, parentsUntil) and

next/prevUntil to it's own plugin. You could then provide both
jdMenu-only package and a jdMenu-with-dependencies package.

The bgiframe plugin is really easy to use, you just apply it to all
elements that need the iframe.



I'm looking at implementing this now.

Of course it would be nice to customize the behaviour via options, but

that was also mentioned before.

And a hint that works from 1.1 on:
The intialization code at the top depends on the $ alias. You can avoid
that even without the custom alias pattern used for the plugin itself.
As of 1.1, a reference to the jQuery function is passed as an argument
to the document ready event. So you can rewrite this:

$(function(){
   $('ul.jd_menu').jdMenu();
   $(document).bind('click', function() {
   $('ul.jd_menu ul:visible').jdMenuHide();
   });
});

To this:

jQuery(function($){
   $('ul.jd_menu').jdMenu();
   $(document).bind('click', function() {
   $('ul.jd_menu ul:visible').jdMenuHide();
   });
});

And none of the code would depend any more on the $ alias being present.



Also made this change locally.

Cheers,
-js
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-15 Thread Aaron Heimlich

On 1/15/07, Jonathan Sharp [EMAIL PROTECTED] wrote:


Is jQuery's even object that gets passed in standard or would I have to
code around W3C/IE target vs. srcElement?



jQuery does some basic normalization to ensure the event object you receive
complies with the W3C DOM2 Spec (and yes, event.target vs.
event.srcElementis one of them). See
http://docs.jquery.com/Events_%28Guide%29 for more info (Note: there don't
seem to be any pages linking here[1]. I actually had to search to find it).

There's also the fix_events plugin which does some more extensive
normalization:
http://jquery.com/dev/svn/trunk/plugins/fix_events/fix_events.js

[1]
http://docs.jquery.com/index.php?title=Special:Whatlinksheretarget=Events_%28Guide%29

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-13 Thread Jörn Zaefferer
Jonathan Sharp schrieb:
 I finally got around to finishing the pages and packaging the plugin 
 last night. Enjoy!
  
 http://jdsharp.us/code/jQuery/plugins/jdMenu/
Great to see an update to this plugin!

Have you considered or tried an event delegation approach? That is, 
assign the click handlers to the entire menu instead of each li, and use 
the event's target property then. You'd have less event handlers, though 
more code to figure what to do when the event is fired. And you can add 
and remove as many elements as you like, there would be no need to un- 
or rebind any event handlers.

For 1.1 compability, I think the only thing you have to change is 
ancestors() to parents().

Maybe we should move ancestorsUntil (or rather, parentsUntil) and 
next/prevUntil to it's own plugin. You could then provide both 
jdMenu-only package and a jdMenu-with-dependencies package.

The bgiframe plugin is really easy to use, you just apply it to all 
elements that need the iframe.

Of course it would be nice to customize the behaviour via options, but 
that was also mentioned before.

And a hint that works from 1.1 on:
The intialization code at the top depends on the $ alias. You can avoid 
that even without the custom alias pattern used for the plugin itself.
As of 1.1, a reference to the jQuery function is passed as an argument 
to the document ready event. So you can rewrite this:

$(function(){
$('ul.jd_menu').jdMenu();
$(document).bind('click', function() {
$('ul.jd_menu ul:visible').jdMenuHide();
});
});

To this:

jQuery(function($){
$('ul.jd_menu').jdMenu();
$(document).bind('click', function() {
$('ul.jd_menu ul:visible').jdMenuHide();
});
});

And none of the code would depend any more on the $ alias being present.

-- 
Jörn Zaefferer

http://bassistance.de


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Jonathan Sharp

I finally got around to finishing the pages and packaging the plugin last
night. Enjoy!

http://jdsharp.us/code/jQuery/plugins/jdMenu/

Cheers,
-Jonathan
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Andy Matthews
Nicely done...
 
This might be a setting you've got on the menu, but it doesn't seem very
responsive. It's almost a whole second of wait onmouseover for the menu to
popup.

  _  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jonathan Sharp
Sent: Friday, January 12, 2007 12:27 PM
To: jQuery Discussion.
Subject: [jQuery] [plugin] jdMenu - Finally Released!


I finally got around to finishing the pages and packaging the plugin last
night. Enjoy!
 
http://jdsharp.us/code/jQuery/plugins/jdMenu/
 
Cheers,
-Jonathan
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Mike Alsup
 I finally got around to finishing the pages and packaging the plugin last
 night. Enjoy!

Excellent work , Jonathan!   Note that the compatibility plugin is
necessary for use with jQuery v1.1.

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Mike Alsup
 Nicely done...

 This might be a setting you've got on the menu, but it doesn't seem very
 responsive. It's almost a whole second of wait onmouseover for the menu to
 popup.

Yeah, it's 500ms which is a bit sluggish for my liking as well.  Just
mod the file if you want something different.  I set it to 200 and it
runs nicely.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Andy Matthews
Okay. I figured that it was a setting. Other than that (which can be
changed) this is excellent work.


andy 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Friday, January 12, 2007 12:56 PM
To: jQuery Discussion.
Subject: Re: [jQuery] [plugin] jdMenu - Finally Released!

 Nicely done...

 This might be a setting you've got on the menu, but it doesn't seem 
 very responsive. It's almost a whole second of wait onmouseover for 
 the menu to popup.

Yeah, it's 500ms which is a bit sluggish for my liking as well.  Just mod
the file if you want something different.  I set it to 200 and it runs
nicely.

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Brandon Aaron
Cool. You could reduce your own code by using the bgiframe plugin
found in SVN instead of messing with it yourself. It is okay to have a
dependency on a few plugins ... especially if it is something that
other plugins use and not to mention in the developers own custom
code. If every plugin implemented this same hack in different ways,
there are like 10 lines of code for each that could be dropped to just
one plugin and one way.

Just an idea. :)

--
Brandon Aaron

On 1/12/07, Jonathan Sharp [EMAIL PROTECTED] wrote:
 I finally got around to finishing the pages and packaging the plugin last
 night. Enjoy!

 http://jdsharp.us/code/jQuery/plugins/jdMenu/

 Cheers,
 -Jonathan
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Allan Mullan
Hey Jonathan,

I just tried to download the zip (top link under the 1.1 release) but 
it's a broken link...?

Allan


Jonathan Sharp wrote:
 I finally got around to finishing the pages and packaging the plugin 
 last night. Enjoy!
  
 http://jdsharp.us/code/jQuery/plugins/jdMenu/
  
 Cheers,
 -Jonathan
 

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
   

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Christopher Jordan

Ditto. I'd love to use it in a project I'm working on right now. :o)

Chris

Allan Mullan wrote:

Hey Jonathan,

I just tried to download the zip (top link under the 1.1 release) but 
it's a broken link...?


Allan


Jonathan Sharp wrote:
  
I finally got around to finishing the pages and packaging the plugin 
last night. Enjoy!
 
http://jdsharp.us/code/jQuery/plugins/jdMenu/
 
Cheers,

-Jonathan


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
  



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

  


--
http://www.cjordan.info

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Jonathan Sharp

Fixed! I had renamed it to jdMenu-1.1.zip...

-js


On 1/12/07, Allan Mullan [EMAIL PROTECTED] wrote:


Hey Jonathan,

I just tried to download the zip (top link under the 1.1 release) but
it's a broken link...?

Allan


Jonathan Sharp wrote:
 I finally got around to finishing the pages and packaging the plugin
 last night. Enjoy!

 http://jdsharp.us/code/jQuery/plugins/jdMenu/

 Cheers,
 -Jonathan
 

 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Jonathan Sharp

Ah thanks! I'll have to update that. I haven't had time to test with
1.1yet. I'll see if I can refactor it this weekend.

-js


On 1/12/07, Mike Alsup [EMAIL PROTECTED] wrote:


 I finally got around to finishing the pages and packaging the plugin
last
 night. Enjoy!

Excellent work , Jonathan!   Note that the compatibility plugin is
necessary for use with jQuery v1.1.

Mike

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Jonathan Sharp

Yeah, it's an internal setting. People were frustrated with accidentally
flipping menues, so I had it delay slightly. You can also click on a menu
to activate it. Also clicking anywhere in the document will hide all menu's.
I'm going to add support for passing options in.

-js


On 1/12/07, Andy Matthews [EMAIL PROTECTED] wrote:


 Nicely done...

This might be a setting you've got on the menu, but it doesn't seem very
responsive. It's almost a whole second of wait onmouseover for the menu to
popup.

 --
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On
Behalf Of *Jonathan Sharp
*Sent:* Friday, January 12, 2007 12:27 PM
*To:* jQuery Discussion.
*Subject:* [jQuery] [plugin] jdMenu - Finally Released!


 I finally got around to finishing the pages and packaging the plugin last
night. Enjoy!

http://jdsharp.us/code/jQuery/plugins/jdMenu/

Cheers,
-Jonathan

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/



___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] [plugin] jdMenu - Finally Released!

2007-01-12 Thread Jonathan Sharp

I'd be very interested in that. Have to run, I'll write more about this
shortly...

-js


On 1/12/07, Brandon Aaron [EMAIL PROTECTED] wrote:


Cool. You could reduce your own code by using the bgiframe plugin
found in SVN instead of messing with it yourself. It is okay to have a
dependency on a few plugins ... especially if it is something that
other plugins use and not to mention in the developers own custom
code. If every plugin implemented this same hack in different ways,
there are like 10 lines of code for each that could be dropped to just
one plugin and one way.

Just an idea. :)

--
Brandon Aaron

On 1/12/07, Jonathan Sharp [EMAIL PROTECTED] wrote:
 I finally got around to finishing the pages and packaging the plugin
last
 night. Enjoy!

 http://jdsharp.us/code/jQuery/plugins/jdMenu/

 Cheers,
 -Jonathan
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/




___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/