Re: [jQuery] Interface Elements Autocomplete plugin problems...

2006-10-07 Thread Stefan Petre




Rich Manalang wrote:
Hi.  I just started using the Interface Elements
Autocomplete plugin (http://interface.eyecon.ro/docs/autocomplete)
for a web app I support.  It works great on IE/Firefox (win) under most
circumstances.  However, on Firefox, when document.domain is set, it
fails to work.  I tried debugging it using Firebug, but it wasn't
throwing any errors.  Just wondering if anyone's had this problem
before.
  
Unfortunately, I can't remove the document.domain setting... it's part
of the web app and I have no control over that.
  
Rich
  

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

One question: The page that has the autocompleter is on the same domain
as the XML source?



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


Re: [jQuery] .each backwards ?

2006-10-07 Thread Michael Geary
> From: Dossy Shiobara
> 
> I'm surprised there's no .reverse().  i.e.:
> 
> $(collection).reverse().each(...) 

Great idea!

How about the world's smallest plugin:

   jQuery.fn.reverse = [].reverse;

Try it out at http://jquery.com/ by entering these lines into the FireBug
console:

   jQuery.fn.reverse = [].reverse;

   $('h3').each( function() { console.info( this.innerHTML ); } );

   $('h3').reverse().each( function() { console.info( this.innerHTML ); } );

Just for fun, you can add .sort():

   jQuery.fn.sort = [].sort;

And then try this:

   $('h3').sort( function( a, b ) {
  var a = a.innerHTML, b = b.innerHTML;
  return a > b ? 1 : a < b ? -1 : 0
   }).each( function() { console.info( this.innerHTML ); } );

Or all on one line for the FireBug console:

   $('h3').sort( function( a, b ) { var a = a.innerHTML, b = b.innerHTML;
return a > b ? 1 : a < b ? -1 : 0  } ).each( function() { console.info(
this.innerHTML ); } );

It looks like you can add pretty much any Array method this way, although
most of the others duplicate what you can do in other ways. For example:

   jQuery.fn.shift = [].shift;

And then try:

   $h3 = $('h3')
   $h3
   $h3.shift()
   $h3
   $h3.shift()
   $h3

Armed with this knowledge, one might be tempted to load all the Array
methods in one fell swoop:

   jQuery.fn.prototype = Array.prototype;

But that does not work, presumably because jQuery is already being a bit
sneaky about its Array-like behavior.

-Mike


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


[jQuery] New plugin: sparkline

2006-10-07 Thread Franck Marcia
Hi all,

I've released a new plugin: sparkline. A sparkline is an inline
graphic 
(http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1).

I borrowed the idea (and most of the code) from the TiddlyWiki
project, a very good one-page wiki (http://www.tiddlywiki.com). Thanks
to Jeremy Ruston for his work and his permission.

Here is the link to the test page:
http://fmarcia.info/jquery/sparkline/sparkline.html

It's tested successfully on Windows XP with FF1.5.07, IE5.5, IE6,
IE7RC1 and Opera 9.02. However, even if it works fine with FF on
Linux, it doesn't behave correctly with Konqueror. I assume it's the
same with Safari...

As usual, any comment appreciated.

Cheers,

Franck.

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


Re: [jQuery] .each backwards ?

2006-10-07 Thread Jörn Zaefferer
Michael Geary schrieb:
>> From: Dossy Shiobara
>>
>> I'm surprised there's no .reverse().  i.e.:
>>
>> $(collection).reverse().each(...) 
>> 
>
> Great idea!
>
> How about the world's smallest plugin:
>
>jQuery.fn.reverse = [].reverse;
>   
That's some really great stuff! It took me some time to figure out that 
you are simply extending jQuery with an existing built-in function... 
Very neat.
> Armed with this knowledge, one might be tempted to load all the Array
> methods in one fell swoop:
>
>jQuery.fn.prototype = Array.prototype;
>
> But that does not work, presumably because jQuery is already being a bit
> sneaky about its Array-like behavior.
>   
You try to assign the Array prototype to the prototype of the jQuery 
prototype, right?

After some experiments on the firebug console, I think the reason for 
this no working is the Array prototype: It is just an empty error, see 
for yourself:
console.debug( Array.prototype );
Therefore jQuery.fn.extend(Array.prototype) doesn't work either.

But we could just add something like this:
var arr = "reverse,pop,push,join,shift,rest of the array 
methods".split(",");
for(var i=0; ihttp://jquery.com/discuss/


Re: [jQuery] search for id with '/' character

2006-10-07 Thread Jörn Zaefferer
[EMAIL PROTECTED] schrieb:
> var a = $("[EMAIL PROTECTED]'content/mytest']");
>   
That should be $('[EMAIL PROTECTED]'content/mytest']).

#input would select an element with the id input.

-- Jörn

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


Re: [jQuery] New tableSorter demo, custom text extraction and more.

2006-10-07 Thread dbzz



> Looks better, Christian. Great work. You might want to get rid of the  
> padding-left: 25px from .largeHeaders, and instead do something like  
> this:
> a.sorter {
>   padding-left: 25px;
>   color: #006;
>   text-decoration: none;
> }
> 
> That way, the images will appear clickable as well as the text.
> 
> Cheers,
> 
> Karl
> 
> ___
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 

to make the link fill the th -

a.sorter {
  display: block;
  float: none;
  padding-left: 25px;
  color: #006;
  text-decoration: none;
}
-- 
View this message in context: 
http://www.nabble.com/New-tableSorter-demo%2C-custom-text-extraction-and-more.-tf2384147.html#a6683620
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] jQuery and Prototype

2006-10-07 Thread Jan Rosa
Hello,
I think there i no need to replace $ in next release. You can employ 
server search&replace

Look at example:
http://www.freshconcept.cz/uschovna/jQueryIsolate.phps

then you use:




Jan Rosa



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


Re: [jQuery] .each backwards ?

2006-10-07 Thread kenton.simpson

Thanks for the Idea. This works 

jQuery.fn.reverse = function() {
 this.pushStack(this.get().reverse());
 return this;
}

a long that thread a lot more resorting function may be useful.
-- 
View this message in context: 
http://www.nabble.com/.each-backwards---tf2399145.html#a6693603
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] .each backwards ?

2006-10-07 Thread Jörn Zaefferer
kenton.simpson schrieb:
> Thanks for the Idea. This works 
>
> jQuery.fn.reverse = function() {
>  this.pushStack(this.get().reverse());
>  return this;
> }
>   
Nice. That is a better approach then just doing jQuery.fn.reverse = 
[].reverse.

-- Jörn

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


Re: [jQuery] Cheat Sheet?

2006-10-07 Thread Karl Swedberg
On Oct 6, 2006, at 11:41 PM, Rey Bango wrote:
> I recall a JQuery cheat sheet floating around. Anyone have the link  
> to that?

Hi Rey,

They came from Nilesh Patel.

PDF
http://www.define-web.com/jquery_cheat_sheet/ 
jquery_cheat_sheet_080306_v1.pdf
http://www.define-web.com/jquery_cheat_sheet/ 
jquery_cheat_sheet_080306_v1_pg2.pdf

PNG
http://www.define-web.com/jquery_cheat_sheet/ 
jquery_cheat_sheet_080306_v1.png
http://www.define-web.com/jquery_cheat_sheet/ 
jquery_cheat_sheet_080306_v1_pg2.png

Cheers,
Karl

___
Karl Swedberg
www.englishrules.com
www.learningjquery.com



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


Re: [jQuery] jQuery and Prototype

2006-10-07 Thread Jörn Zaefferer
Jan Rosa schrieb:
> Hello,
> I think there i no need to replace $ in next release. You can employ 
> server search&replace
>
> Look at example:
> http://www.freshconcept.cz/uschovna/jQueryIsolate.phps
>
> then you use:
>
>  src="...pathto/jQueryIsolate.php?js=jquery-latest.js,pause.js,hovertip.js">
>   
Interesting. But I'd consider that only a workaround, not a solution.

-- Jörn

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


Re: [jQuery] New plugin: sparkline

2006-10-07 Thread Karl Swedberg
On Oct 7, 2006, at 6:56 AM, Franck Marcia wrote:

> I've released a new plugin: sparkline. A sparkline is an inline
> graphic (http://www.edwardtufte.com/bboard/q-and-a-fetch-msg? 
> msg_id=0001OR&topic_id=1).
>
> I borrowed the idea (and most of the code) from the TiddlyWiki
> project, a very good one-page wiki (http://www.tiddlywiki.com). Thanks
> to Jeremy Ruston for his work and his permission.
>
> Here is the link to the test page:
> http://fmarcia.info/jquery/sparkline/sparkline.html
>
> It's tested successfully on Windows XP with FF1.5.07, IE5.5, IE6,
> IE7RC1 and Opera 9.02. However, even if it works fine with FF on
> Linux, it doesn't behave correctly with Konqueror. I assume it's the
> same with Safari...

Cool plugin! Looks good to me in Safari.

Cheers,
Karl
___
Karl Swedberg
www.englishrules.com
www.learningjquery.com



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


Re: [jQuery] .each backwards ?

2006-10-07 Thread John Resig
> jQuery.fn.reverse = function() {
>  this.pushStack(this.get().reverse());
>  return this;
> }

Huh, at first I though that that code would infinitely recurse, I
totally forgot that .get() returns a "clean" array of elements - good
call! Just a quick simplification:

jQuery.fn.reverse = function() {
  return this.pushStack(this.get().reverse(), arguments);
};

going through the other functions, you can easily do .sort() and the
other functions too:

jQuery.fn.sort = function() {
  return this.pushStack( [].sort.apply( this, arguments ), []);
};

// These don't quite work correctly - but making them work "correctly" would
//  break jQuery (having duplicate instances of an element)
jQuery.fn.push = jQuery.fn.add;
jQuery.fn.unshift = jQuery.fn.unshift;

jQuery.fn.slice = function() {
  return this.pushStack( [].slice.apply( this, arguments ), arguments );
};

jQuery.fn.pop = function(fn){
  return this.slice( 0, -1, fn );
};

jQuery.fn.shift = function(fn){
  return this.slice( 1, this.length, fn );
};

I can definitely see .sort() and .reverse() being useful - along with
a better version of slice, but push, pop, shift, unshift are all kind
of lame (IMO).

--John

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


Re: [jQuery] New plugin: sparkline

2006-10-07 Thread John Resig
Back in the day I wrote some sparkline code myself:
http://ejohn.org/apps/jspark/

This particular one uses the Canvas element (giving it a nice
antialias). My code looks kind of scary, in retrospect, but it seems
like it wouldn't be too bad to give it a jQuery facelift.

Franck - Doing a quick check to see if the user is using IE, or not,
you could be able to use the Canvas element no problem.

--John

On 10/7/06, Franck Marcia <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've released a new plugin: sparkline. A sparkline is an inline
> graphic 
> (http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1).
>
> I borrowed the idea (and most of the code) from the TiddlyWiki
> project, a very good one-page wiki (http://www.tiddlywiki.com). Thanks
> to Jeremy Ruston for his work and his permission.
>
> Here is the link to the test page:
> http://fmarcia.info/jquery/sparkline/sparkline.html
>
> It's tested successfully on Windows XP with FF1.5.07, IE5.5, IE6,
> IE7RC1 and Opera 9.02. However, even if it works fine with FF on
> Linux, it doesn't behave correctly with Konqueror. I assume it's the
> same with Safari...
>
> As usual, any comment appreciated.
>
> Cheers,
>
> Franck.
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
John Resig
http://ejohn.org/
[EMAIL PROTECTED]

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


Re: [jQuery] .each backwards ?

2006-10-07 Thread Jörn Zaefferer
Hi John!
> jQuery.fn.unshift = jQuery.fn.unshift;
>   
What is that supposed to do?

-- Jörn

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


Re: [jQuery] Cheat Sheet?

2006-10-07 Thread Rey Bango
Awesome! Thanks Karl!

Karl Swedberg wrote:
> On Oct 6, 2006, at 11:41 PM, Rey Bango wrote:
> 
>>I recall a JQuery cheat sheet floating around. Anyone have the link  
>>to that?
> 
> 
> Hi Rey,
> 
> They came from Nilesh Patel.
> 
> PDF
> http://www.define-web.com/jquery_cheat_sheet/ 
> jquery_cheat_sheet_080306_v1.pdf
> http://www.define-web.com/jquery_cheat_sheet/ 
> jquery_cheat_sheet_080306_v1_pg2.pdf
> 
> PNG
> http://www.define-web.com/jquery_cheat_sheet/ 
> jquery_cheat_sheet_080306_v1.png
> http://www.define-web.com/jquery_cheat_sheet/ 
> jquery_cheat_sheet_080306_v1_pg2.png
> 
> Cheers,
> Karl
> 
> ___
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 

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


Re: [jQuery] .each backwards ?

2006-10-07 Thread kenton.simpson

I agree, do you think .sort() and .reverse() could be added to core jQuery
object in the future, or should I just add a plugin.
-- 
View this message in context: 
http://www.nabble.com/.each-backwards---tf2399145.html#a6694292
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] ScrollTo FX with a IFRAME

2006-10-07 Thread zelda2

I still could use some help with this guys - does anyone know how I would
call the ScrollTo plugin from one page to another?

Thanks - 

AR



zelda2 wrote:
> 
> I?ve been trying to figure this out for days and no luck. I?m trying to
> use the ScrollTo (Interface) plugin to control the scrolling behavior of a
> page that exists within an IFRAME. 
> 
> An example would be that my home page (home.html) has a navigation menu.
> Those menu links point to a page inside of an iframe (inside.html), which
> have anchors separating the different content areas. 
> 
> Is there any way to have the ScrollTo plugin work across 2 pages,
> specifically and iframe?
> 
> Thanks in advance for you help ?
> 
> AR
> 

-- 
View this message in context: 
http://www.nabble.com/ScrollTo-FX-with-a-IFRAME-tf2367205.html#a6694893
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Forms and the fx module

2006-10-07 Thread Brandon Aaron
My site was down ... but it is back up now ... sorry about that. I
seem to be having issues with Mongrel and/or Typo :/

BTW ... you can just grab the full jQuery revision 404 with the patch
from here: http://brandonaaron.net/jquery/opacity/jquery.opacitypatch.js
to make sure it works for you before trying to apply the patch to your
own.

--
Brandon Aaron

On 10/6/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> I take that back ... neither of those patches are going to work. This
> new patch should fix everything dealing with opacity and IE. I was
> running around in circles through that fx code for forever to figure
> all of it out.
>
> Bug report: http://jquery.com/dev/bugs/bug/204/
> New patch against revision 404:
> http://brandonaaron.net/jquery/opacity/opacity.diff
> Example/Test: http://brandonaaron.net/jquery/opacity/opacity.html
> Broken, unpatched revision 396:
> http://brandonaaron.net/jquery/opacity/opacity.broken.html
>
> Brandon Aaron
>
> On 10/6/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > Please use the patch in the comments as it will work. The first patch
> > (in the yellow) is the first but doesn't patch everything. The second
> > patch will fix what you need.
> >
> > I'm actually working on a better one right now and might have
> > something ready within the hour.
> >
> > --
> > Brandon Aaron
> >
> > On 10/6/06, Kolak Roy M. <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > >
> > > Brandon,
> > >
> > >
> > >
> > > I applied your patch to the uncompressed jquery.js file. I added the
> > > appropriate lines and removed the marked lines.  I only applied the top
> > > patch (the patch in the yellow box) to the jquery.js file. For each
> > > situation, I used the .show and .hide functions of the fx module.  The
> > > results were not as expected…
> > >
> > >
> > >
> > > FireFox (1.5.0.7)-
> > >
> > > Text and forms are displayed/hidden correctly
> > >
> > >
> > >
> > > IE (6.0.29…)-
> > >
> > > Text Only – showing and hiding works the first time. If I try to perform
> > > these tasks again, I can see the div tag expand, but no text is displayed.
> > >
> > > Form Only – The form is either visible or not, no transition is used.
> > > Performed successfully many times
> > >
> > > Form and Text – The transition is applied to the text, but not the form.
> > > Performed many times, received same results
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > ___
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> > >
> > >
> >
>

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


Re: [jQuery] Forms and the fx module

2006-10-07 Thread Matt Stith
am i the only one that read that as "revision not found"?...

anyways, great job!

On 10/7/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> My site was down ... but it is back up now ... sorry about that. I
> seem to be having issues with Mongrel and/or Typo :/
>
> BTW ... you can just grab the full jQuery revision 404 with the patch
> from here: http://brandonaaron.net/jquery/opacity/jquery.opacitypatch.js
> to make sure it works for you before trying to apply the patch to your
> own.
>
> --
> Brandon Aaron
>
> On 10/6/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > I take that back ... neither of those patches are going to work. This
> > new patch should fix everything dealing with opacity and IE. I was
> > running around in circles through that fx code for forever to figure
> > all of it out.
> >
> > Bug report: http://jquery.com/dev/bugs/bug/204/
> > New patch against revision 404:
> > http://brandonaaron.net/jquery/opacity/opacity.diff
> > Example/Test: http://brandonaaron.net/jquery/opacity/opacity.html
> > Broken, unpatched revision 396:
> > http://brandonaaron.net/jquery/opacity/opacity.broken.html
> >
> > Brandon Aaron
> >
> > On 10/6/06, Brandon Aaron <[EMAIL PROTECTED]> wrote:
> > > Please use the patch in the comments as it will work. The first patch
> > > (in the yellow) is the first but doesn't patch everything. The second
> > > patch will fix what you need.
> > >
> > > I'm actually working on a better one right now and might have
> > > something ready within the hour.
> > >
> > > --
> > > Brandon Aaron
> > >
> > > On 10/6/06, Kolak Roy M. <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > >
> > > > Brandon,
> > > >
> > > >
> > > >
> > > > I applied your patch to the uncompressed jquery.js file. I added the
> > > > appropriate lines and removed the marked lines.  I only applied the
> top
> > > > patch (the patch in the yellow box) to the jquery.js file. For each
> > > > situation, I used the .show and .hide functions of the fx module.  The
> > > > results were not as expected…
> > > >
> > > >
> > > >
> > > > FireFox (1.5.0.7)-
> > > >
> > > > Text and forms are displayed/hidden correctly
> > > >
> > > >
> > > >
> > > > IE (6.0.29…)-
> > > >
> > > > Text Only – showing and hiding works the first time. If I try to
> perform
> > > > these tasks again, I can see the div tag expand, but no text is
> displayed.
> > > >
> > > > Form Only – The form is either visible or not, no transition is used.
> > > > Performed successfully many times
> > > >
> > > > Form and Text – The transition is applied to the text, but not the
> form.
> > > > Performed many times, received same results
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ___
> > > > 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] New plugin: sparkline

2006-10-07 Thread Franck Marcia
@ Karl: thank you for the info.

@ John: I will take a look at canvas; I missed your implementation but
now, I will certainly borrow some parts ;-)

Cheers,

Franck.

2006/10/7, John Resig <[EMAIL PROTECTED]>:
> Back in the day I wrote some sparkline code myself:
> http://ejohn.org/apps/jspark/
>
> This particular one uses the Canvas element (giving it a nice
> antialias). My code looks kind of scary, in retrospect, but it seems
> like it wouldn't be too bad to give it a jQuery facelift.
>
> Franck - Doing a quick check to see if the user is using IE, or not,
> you could be able to use the Canvas element no problem.
>
> --John
>
> On 10/7/06, Franck Marcia <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I've released a new plugin: sparkline. A sparkline is an inline
> > graphic 
> > (http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1).
> >
> > I borrowed the idea (and most of the code) from the TiddlyWiki
> > project, a very good one-page wiki (http://www.tiddlywiki.com). Thanks
> > to Jeremy Ruston for his work and his permission.
> >
> > Here is the link to the test page:
> > http://fmarcia.info/jquery/sparkline/sparkline.html
> >
> > It's tested successfully on Windows XP with FF1.5.07, IE5.5, IE6,
> > IE7RC1 and Opera 9.02. However, even if it works fine with FF on
> > Linux, it doesn't behave correctly with Konqueror. I assume it's the
> > same with Safari...
> >
> > As usual, any comment appreciated.
> >
> > Cheers,
> >
> > Franck.
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
> --
> John Resig
> http://ejohn.org/
> [EMAIL PROTECTED]
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] .each backwards ?

2006-10-07 Thread Michael Geary
> > From: Michael Geary
> >
> > Armed with this knowledge, one might be tempted to load
> > all the Array methods in one fell swoop:
> >
> >jQuery.fn.prototype = Array.prototype;
> >
> > But that does not work, presumably because jQuery is 
> > already being a bit sneaky about its Array-like behavior.

> From: Jörn Zaefferer
> 
> You try to assign the Array prototype to the prototype of the 
> jQuery prototype, right?
> 
> After some experiments on the firebug console, I think the 
> reason for this no working is the Array prototype: It is just 
> an empty error, see for yourself:
> console.debug( Array.prototype );
> Therefore jQuery.fn.extend(Array.prototype) doesn't work either.

I'm not sure why it doesn't work, but that's not the reason. Array.prototype
is populated with the Array methods, but like most or all of the native
objects, those methods are marked as non-enumerable. Try these in the
FireBug console:

   console.debug( Array.prototype.sort );

   console.debug( Array.prototype.reverse );

In fact, instead of:

   jQuery.fn.reverse = [].reverse;

This would work the same:

   jQuery.fn.reverse = Array.prototype.reverse;

And you can confirm that they are identical in the FireBug console:

   [].reverse === Array.prototype.reverse

> But we could just add something like this:
> var arr = "reverse,pop,push,join,shift,rest of the array 
> methods".split(","); for(var i=0; i jQuery.fn[arr[i]] = [][arr[i]];
> }

That would do the trick. BTW, just for fun, here is another way I like to
write these kinds of loops when using a small number of items:

   var names = { reverse:1, sort:1, etc. };
   for( var name in names )
  jQuery.fn[name] = [][name];

-Mike


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


Re: [jQuery] .each backwards ?

2006-10-07 Thread Michael Geary
> > jQuery.fn.reverse = function() {
> >this.pushStack(this.get().reverse());
> >return this;
> > }

> Nice. That is a better approach then just doing 
> jQuery.fn.reverse = [].reverse.

I'm curious, what is the advantage of one approach over the other?

-Mike


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


Re: [jQuery] .each backwards ?

2006-10-07 Thread John Resig
On 10/7/06, Michael Geary <[EMAIL PROTECTED]> wrote:
> > > jQuery.fn.reverse = function() {
> > >this.pushStack(this.get().reverse());
> > >return this;
> > > }
>
> > Nice. That is a better approach then just doing
> > jQuery.fn.reverse = [].reverse.
>
> I'm curious, what is the advantage of one approach over the other?

Since the first once uses jQuery's nice pushStack method, you can now
do (in a silly example):

$("div")
.reverse()
.addClass("test")
.end()
.find("p") 

or even:

$("div").reverse(function(){
alert("All the divs, in reverse: " + this);
});

--John

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


Re: [jQuery] search for id with '/' character

2006-10-07 Thread Su
I'm curious: Why is everybody trying to "fix" the selector problem, 
rather than pointing out the ID is invalid in the first place?

Dexter: Get rid of the slash altogether. Problem solved.

You might be able to work around this with the various suggestions 
others have made, but if your document isn't valid before you start 
applying scripting, you've leaving the door open for future problems.



[EMAIL PROTECTED] wrote:
> Hi,
> 
> if I have a form like
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> How can I get the value for the input text field using jquery?
> 
> I tried 
> 
> 
> 
> 
> 
> 
> 
> $(document).ready(function(){
> 
>   var a = $("[EMAIL PROTECTED]'content/mytest']");
> 
>   alert(a.val());
> 
> });
> 
> 
> 
> 
> 
> 
> 
> but it does not work. Thanks
> 
> 
> 
> ___
> 
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


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


Re: [jQuery] .each backwards ?

2006-10-07 Thread John Resig
Oops, I meant to make that:
jQuery.fn.unshift = jQuery.fn.add;

The issue is, however, that fundamentally .push() or .unshift() won't
work as expected, since adding an item to a jQuery object isn't like
adding a item to a normal array. The jQuery object is more like a
'Set' than it is a true 'Array'.

--John

On 10/7/06, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Hi John!
> > jQuery.fn.unshift = jQuery.fn.unshift;
> >
> What is that supposed to do?
>
> -- Jörn
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
John Resig
http://ejohn.org/
[EMAIL PROTECTED]

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


Re: [jQuery] .each backwards ?

2006-10-07 Thread John Resig
> I agree, do you think .sort() and .reverse() could be added to core jQuery
> object in the future, or should I just add a plugin.

Sort, reverse, and splice are definitely possible - maybe for the 1.1 release.

--John

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


Re: [jQuery] New plugin: sparkline

2006-10-07 Thread Ⓙⓐⓚⓔ
I am a total sucker for images without files! I really like the use of
a tiny inline image with different bg colors. I experimented with
inline images in an atom feed... it didn't work for all feed readers!

I also like the canvas method that John used, I look forward to your
merged version!

On 10/7/06, Franck Marcia <[EMAIL PROTECTED]> wrote:
> @ Karl: thank you for the info.
>
> @ John: I will take a look at canvas; I missed your implementation but
> now, I will certainly borrow some parts ;-)
>
> Cheers,
>
> Franck.
>
> 2006/10/7, John Resig <[EMAIL PROTECTED]>:
> > Back in the day I wrote some sparkline code myself:
> > http://ejohn.org/apps/jspark/
> >
> > This particular one uses the Canvas element (giving it a nice
> > antialias). My code looks kind of scary, in retrospect, but it seems
> > like it wouldn't be too bad to give it a jQuery facelift.
> >
> > Franck - Doing a quick check to see if the user is using IE, or not,
> > you could be able to use the Canvas element no problem.
> >
> > --John
> >
> > On 10/7/06, Franck Marcia <[EMAIL PROTECTED]> wrote:
> > > Hi all,
> > >
> > > I've released a new plugin: sparkline. A sparkline is an inline
> > > graphic 
> > > (http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=0001OR&topic_id=1).
> > >
> > > I borrowed the idea (and most of the code) from the TiddlyWiki
> > > project, a very good one-page wiki (http://www.tiddlywiki.com). Thanks
> > > to Jeremy Ruston for his work and his permission.
> > >
> > > Here is the link to the test page:
> > > http://fmarcia.info/jquery/sparkline/sparkline.html
> > >
> > > It's tested successfully on Windows XP with FF1.5.07, IE5.5, IE6,
> > > IE7RC1 and Opera 9.02. However, even if it works fine with FF on
> > > Linux, it doesn't behave correctly with Konqueror. I assume it's the
> > > same with Safari...
> > >
> > > As usual, any comment appreciated.
> > >
> > > Cheers,
> > >
> > > Franck.
> > >
> > > ___
> > > jQuery mailing list
> > > discuss@jquery.com
> > > http://jquery.com/discuss/
> > >
> >
> >
> > --
> > John Resig
> > http://ejohn.org/
> > [EMAIL PROTECTED]
> >
> > ___
> > 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] search for id with '/' character

2006-10-07 Thread Michael Geary
> From: Su
> 
> I'm curious: Why is everybody trying to "fix" the selector 
> problem, rather than pointing out the ID is invalid in the 
> first place?
> 
> Dexter: Get rid of the slash altogether. Problem solved.
> 
> You might be able to work around this with the various 
> suggestions others have made, but if your document isn't 
> valid before you start applying scripting, you've leaving the 
> door open for future problems.

Good call. For anyone who is wondering what is valid in an ID:

http://www.w3.org/TR/html4/types.html#type-name

   ID and NAME tokens must begin with a letter ([A-Za-z]) and
   may be followed by any number of letters, digits ([0-9]),
   hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

-Mike


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


[jQuery] downloading plugins?

2006-10-07 Thread Todd Menier
Please forgive my ignorance on this one. I'm embarassed to ask this, but here goes: Is there an easy way to download the plugins hosted on the jQuery site through a browser or do I need use an SVN client? All the formatting applied by TracBrowser makes it nice to look at, but not so nice when I just want the js file. I'm sure I'm missing something simple.
Thanks,Todd
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] search for id with '/' character

2006-10-07 Thread Ⓙⓐⓚⓔ
I wondered the same thing,,, I wouldn't have slashes in my ids... but
he is working with others who  have disregarded standards... It's nice
that JQ can handle messy htmls, instead of just well formed xhtml. I
bet xsl would just plotz!


On 10/7/06, Su <[EMAIL PROTECTED]> wrote:
> I'm curious: Why is everybody trying to "fix" the selector problem,
> rather than pointing out the ID is invalid in the first place?
>
> Dexter: Get rid of the slash altogether. Problem solved.
>
> You might be able to work around this with the various suggestions
> others have made, but if your document isn't valid before you start
> applying scripting, you've leaving the door open for future problems.
>
>
>
> [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > if I have a form like
> >
> >
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> > How can I get the value for the input text field using jquery?
> >
> > I tried
> >
> >
> >
> > 
> >
> >
> >
> > $(document).ready(function(){
> >
> >   var a = $("[EMAIL PROTECTED]'content/mytest']");
> >
> >   alert(a.val());
> >
> > });
> >
> >
> >
> > 
> >
> >
> >
> > but it does not work. Thanks
> >
> >
> >
> > ___
> >
> >
> >
> > ___
> > 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] downloading plugins?

2006-10-07 Thread Mike Alsup
Todd,

Just tack "?format=txt" on to the end of the url.  For example,
http://jquery.com/dev/svn/plugins/form/form.js?format=txt

Mike

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


Re: [jQuery] search for id with '/' character

2006-10-07 Thread Su
Ah. Blame someone else. I see *grin*
It /is/ convenient that jQ can deal with this; I just found it strange 
no one had at least pointed it out. Workarounds are nice, but the *real* 
problem is that the HTML is just wrong, and that should be addressed 
first, if at all possible.


Ⓙⓐⓚⓔ wrote:
> I wondered the same thing,,, I wouldn't have slashes in my ids... but
> he is working with others who  have disregarded standards... It's nice
> that JQ can handle messy htmls, instead of just well formed xhtml. I
> bet xsl would just plotz!


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


Re: [jQuery] downloading plugins?

2006-10-07 Thread Todd Menier
Awesome, thanks so much!On 10/7/06, Mike Alsup <[EMAIL PROTECTED]> wrote:
Todd,Just tack "?format=txt" on to the end of the url.  For example,http://jquery.com/dev/svn/plugins/form/form.js?format=txt
Mike___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/

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


Re: [jQuery] Performance question

2006-10-07 Thread George Adamson


Saw you had no responses so here's a couple of suggestions...

An easy performance booster is to use the second param in $() to set a
context for the search. Eg: $("DIV.myClass", myParentElement). Perhaps this
is what you meant when you mentioned 'getting a parent element' ?

Chaining methods is helpful so you can avoid re-querying. If you need to put
other code in betwen method calls then reusing the same JQuery object by
putting it into a variable beforehand is worth while to save requerying.

If you're going to do several queries inside the same parent element(s) then
a combination of the above will be a big help.

Not sure what experience you have. You may have already tried these
approaches. Worth a try if not. Someone more involved in the development may
be able to offer some more in depth performance tips.

Cheers

George


Raziel Alvarez wrote:
> 
> Hi. I'm building a highly dynamic application based using jQuery
> extensively. I have a set of templates with predefined markup, which is
> retrieved and modified using jQuery CSS queries. However, as the markup
> size
> increases the queries are becoming considerably slow. I've tested some
> different ways of rewriting my queries (retrieving the elements by id,
> searching by name or any other attribute under a specific context, getting
> a
> parent element and traversing the DOM using operations like children(),
> etc.) but I haven't discovered a best practice so I can improve the
> performance consistently.
> 
> I also tried to use XPath queries, but they actually didn't work (even the
> simplest ones) and I think they're built as CSS queries anyway.
> 
> Can anybody point me in the right direction to write performant code with
> jQuery? I know it depends on my markup and other factors, but I wonder if
> there's a set of best practices in order to get the most of the library.
> 
> Thanks,
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Performance-question-tf2398816.html#a6697355
Sent from the JQuery mailing list archive at Nabble.com.


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


[jQuery] Drop down menu

2006-10-07 Thread TJ

Hi, I am trying to make a drop down menu. I have half of it but I need a sub 
menu off to the left. I am using this jquery code.

 $(document).ready(function(){
$("#nav-one li").hover(
function(){ $("ul", this).fadeIn("slow"); }, 
function() { } 
);
if (document.all) {
$("#nav-one li").hoverClass ("sfHover");
}

$("#subnav li").hover(
function(){ $("ul", this).fadeIn("slow"); }, 
function() { } 
);
if (document.all) {
$("#subnav li").hoverClass ("sfHover");
}
  });
  
$.fn.hoverClass = function(c) {
return this.each(function(){
$(this).hover( 
function() { $(this).addClass(c);  },
function() { $(this).removeClass(c); }
);
});
};

Here is the page it is one.
http://www.tjshafer.com/cortek/

Any ideas?
Thanks, TJ



http://www.tjshafer.com/cortek/


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


Re: [jQuery] Interface Elements Autocomplete plugin

2006-10-07 Thread Rich Manalang
Yep... the page that has the autocompleter is on the same domain
 as the XML source.

Rich

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


Re: [jQuery] Performance question

2006-10-07 Thread Karl Swedberg
On Oct 7, 2006, at 3:39 PM, George Adamson wrote:

> An easy performance booster is to use the second param in $() to set a
> context for the search. Eg: $("DIV.myClass", myParentElement).  
> Perhaps this
> is what you meant when you mentioned 'getting a parent element' ?
>
> Chaining methods is helpful so you can avoid re-querying. If you  
> need to put
> other code in betwen method calls then reusing the same JQuery  
> object by
> putting it into a variable beforehand is worth while to save  
> requerying.
>
> If you're going to do several queries inside the same parent element 
> (s) then
> a combination of the above will be a big help.

Those sound like good suggestions to me, though I'm no expert.

Something I try to keep in mind is the relative speed of different  
types of queries. This has been mentioned on the list before, but in  
case you didn't see it, references to IDs are fastest, followed by  
elements, and then classes. At least, that's how I've understood  
previous discussions of the topic. So:
a.  $('#my-id') is faster than $('div#my-id'), and
b. $('div.my-class') is faster than $('.my-class')

Hop that helps.

Karl
___
Karl Swedberg
www.englishrules.com
www.learningjquery.com


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


[jQuery] Broken Build

2006-10-07 Thread Jörn Zaefferer
Hi folks,

the current build script seems to be broken: Only the ajax part of the 
complete jQuery file is parsed, resulting in a lite version with only 
ajax docs removed and api docs and tests with only ajax docs/tests. 
Doing some diff debugging by comparing revisions of the files involved 
(build.xml, build/js/parse.js etc.) didn't reveal anything.

Any ideas? Is this working with the makefile?

-- Jörn

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


Re: [jQuery] New plugin: sparkline

2006-10-07 Thread Franck Marcia
2006/10/7, John Resig <[EMAIL PROTECTED]>:
> Franck - Doing a quick check to see if the user is using IE, or not,
> you could be able to use the Canvas element no problem.

OK, I did it. Same address: http://fmarcia.info/jquery/sparkline/sparkline.html

However, just one color in this case as it doesn't make sense, imo.

And there's a problem with the position of the canvas element I can
solve for the moment. I set the background of the container, a span
element, to black to see it. (any idea?)

Cheers,

Franck.

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


Re: [jQuery] New plugin: sparkline

2006-10-07 Thread Ⓙⓐⓚⓔ
Great code, lots of options, I could see extending it for every
thinkable graph format.

perhaps method:block|line|.. instead of useCanvas: true|false.

Not being an expert on canvas, I would assume there is a fill in the
polygon type command that could help instead of the span?

On 10/7/06, Franck Marcia <[EMAIL PROTECTED]> wrote:
> 2006/10/7, John Resig <[EMAIL PROTECTED]>:
> > Franck - Doing a quick check to see if the user is using IE, or not,
> > you could be able to use the Canvas element no problem.
>
> OK, I did it. Same address: 
> http://fmarcia.info/jquery/sparkline/sparkline.html
>
> However, just one color in this case as it doesn't make sense, imo.
>
> And there's a problem with the position of the canvas element I can
> solve for the moment. I set the background of the container, a span
> element, to black to see it. (any idea?)
>
> Cheers,
>
> Franck.
>
-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] jquery update causes js error

2006-10-07 Thread Stephen Woodbridge
Hi all,

New to jquery and list, but I looked through the archives and didn't see 
anything that help.

I have a page that is working under jquery.js
/* Built Fri May 12 13:01:23 2006 */
* $Rev: 29 $

but I upgraded to jquery-latest.js and todays jquery-svn.js and both of 
these give me an error when the page loads:

c[j] has no properties jquery-svn-200610... (line 963)

which is event: handle: function

I have no clue about this. I am using a couple of bind calls

the page is accessible at:

http://imaptools.com:8081/maps/demo2.html

the working page on the old version is at:

http://imaptools.com:8081/maps/demo.html

Any ideas or help would be appreciated.

-Steve

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


Re: [jQuery] Performance question

2006-10-07 Thread Jacky
Would caching the jQuery object a help too? Sometimes you just can't
keep the chain.

e.g. var jqObj = $("#abc");

On 10/8/06, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> On Oct 7, 2006, at 3:39 PM, George Adamson wrote:
>
> > An easy performance booster is to use the second param in $() to set a
> > context for the search. Eg: $("DIV.myClass", myParentElement).
> > Perhaps this
> > is what you meant when you mentioned 'getting a parent element' ?
> >
> > Chaining methods is helpful so you can avoid re-querying. If you
> > need to put
> > other code in betwen method calls then reusing the same JQuery
> > object by
> > putting it into a variable beforehand is worth while to save
> > requerying.
> >
> > If you're going to do several queries inside the same parent element
> > (s) then
> > a combination of the above will be a big help.
>
> Those sound like good suggestions to me, though I'm no expert.
>
> Something I try to keep in mind is the relative speed of different
> types of queries. This has been mentioned on the list before, but in
> case you didn't see it, references to IDs are fastest, followed by
> elements, and then classes. At least, that's how I've understood
> previous discussions of the topic. So:
> a.  $('#my-id') is faster than $('div#my-id'), and
> b. $('div.my-class') is faster than $('.my-class')
>
> Hop that helps.
>
> Karl
> ___
> Karl Swedberg
> www.englishrules.com
> www.learningjquery.com
>
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


-- 
Best Regards,
Jacky
網絡暴民 http://jacky.seezone.net

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


Re: [jQuery] Broken Build

2006-10-07 Thread Brandon Aaron
I just did a new checkout and did a make pack and everything seems to
be okay. I ran a few of my example pages with it and didn't get any
errors.

--
Brandon Aaron

On 10/7/06, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> Hi folks,
>
> the current build script seems to be broken: Only the ajax part of the
> complete jQuery file is parsed, resulting in a lite version with only
> ajax docs removed and api docs and tests with only ajax docs/tests.
> Doing some diff debugging by comparing revisions of the files involved
> (build.xml, build/js/parse.js etc.) didn't reveal anything.
>
> Any ideas? Is this working with the makefile?
>
> -- Jörn
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] Performance question

2006-10-07 Thread Matt Stith
yes, that would help quite a bit, since jquery would only need to look once.

On 10/7/06, Jacky <[EMAIL PROTECTED]> wrote:
> Would caching the jQuery object a help too? Sometimes you just can't
> keep the chain.
>
> e.g. var jqObj = $("#abc");
>
> On 10/8/06, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> > On Oct 7, 2006, at 3:39 PM, George Adamson wrote:
> >
> > > An easy performance booster is to use the second param in $() to set a
> > > context for the search. Eg: $("DIV.myClass", myParentElement).
> > > Perhaps this
> > > is what you meant when you mentioned 'getting a parent element' ?
> > >
> > > Chaining methods is helpful so you can avoid re-querying. If you
> > > need to put
> > > other code in betwen method calls then reusing the same JQuery
> > > object by
> > > putting it into a variable beforehand is worth while to save
> > > requerying.
> > >
> > > If you're going to do several queries inside the same parent element
> > > (s) then
> > > a combination of the above will be a big help.
> >
> > Those sound like good suggestions to me, though I'm no expert.
> >
> > Something I try to keep in mind is the relative speed of different
> > types of queries. This has been mentioned on the list before, but in
> > case you didn't see it, references to IDs are fastest, followed by
> > elements, and then classes. At least, that's how I've understood
> > previous discussions of the topic. So:
> > a.  $('#my-id') is faster than $('div#my-id'), and
> > b. $('div.my-class') is faster than $('.my-class')
> >
> > Hop that helps.
> >
> > Karl
> > ___
> > Karl Swedberg
> > www.englishrules.com
> > www.learningjquery.com
> >
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
>
>
> --
> Best Regards,
> Jacky
> 網絡暴民 http://jacky.seezone.net
>
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>

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


Re: [jQuery] Drop down menu

2006-10-07 Thread Glen Lipka
have you seen this one? 
http://be.twixt.us/jquery/suckerFish.php
In IE7, the menu items are cut off on yours.
 
Glen 
On 10/7/06, TJ <[EMAIL PROTECTED]> wrote:
Hi, I am trying to make a drop down menu. I have half of it but I need a sub menu off to the left. I am using this jquery code.
$(document).ready(function(){   $("#nav-one li").hover(   function(){ $("ul", this).fadeIn("slow"); },   function() { }
   );   if (document.all) {   $("#nav-one li").hoverClass ("sfHover");   }   $("#subnav li").hover(
   function(){ $("ul", this).fadeIn("slow"); },   function() { }   );   if (document.all) {   $("#subnav li").hoverClass ("sfHover");
   } });   $.fn.hoverClass = function(c) {   return this.each(function(){   $(this).hover(   function() { $(this).addClass(c);  },
   function() { $(this).removeClass(c); }   );   });   };Here is the page it is one.
http://www.tjshafer.com/cortek/Any ideas?Thanks, TJhttp://www.tjshafer.com/cortek/___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Drop down menu

2006-10-07 Thread Kevin Scholl
A great starting point, but to date Myles has not added beyond the first 
level. He does present some excellent work, though, yes?

FWIW , the menu items on TJ's example are cut off on Firefox as well.

I was playing around with this style of menu system this week as well, 
using Myles's and a couple others for baseline code (search back through 
the mailing list entries reveals several approaches). Here's what I have 
thus far:

http://beta.ksscholl.com/jquery/suckerfish.html

Kevin


Glen Lipka wrote:
> have you seen this one? 
> http://be.twixt.us/jquery/suckerFish.php
> In IE7, the menu items are cut off on yours.
>  
> Glen
> 
>  
> On 10/7/06, *TJ* <[EMAIL PROTECTED] > wrote:
> 
> 
> Hi, I am trying to make a drop down menu. I have half of it but I
> need a sub menu off to the left. I am using this jquery code.
> 
> $(document).ready(function(){
>$("#nav-one li").hover(
>function(){ $("ul",
> this).fadeIn("slow"); },
>function() { }
>);
>if (document.all) {
>$("#nav-one li").hoverClass ("sfHover");
>}
> 
>$("#subnav li").hover(
>function(){ $("ul",
> this).fadeIn("slow"); },
>function() { }
>);
>if (document.all) {
>$("#subnav li").hoverClass ("sfHover");
>}
>  });
> 
>$.fn.hoverClass = function(c) {
>return this.each(function(){
>$(this).hover(
>function() {
> $(this).addClass(c);  },
>function() {
> $(this).removeClass(c); }
>);
>});
>};
> 
> Here is the page it is one.
> http://www.tjshafer.com/cortek/
> 
> Any ideas?
> Thanks, TJ
> 
> 
> 
> http://www.tjshafer.com/cortek/
> 
> 
> ___
> 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] Drop down menu

2006-10-07 Thread Karl Swedberg
Feel free to use any code you want from mine, too. I haven't completely polished it up yet, but I'll be writing up something about it within the next couple weeks on learningjquery.com, so I'll be making it look a little prettier in the meantime.http://test.learningjquery.com/dropdown.htmCheers,Karl ___Karl Swedbergwww.englishrules.comwww.learningjquery.com On Oct 7, 2006, at 9:42 PM, Glen Lipka wrote:have you seen this one?  http://be.twixt.us/jquery/suckerFish.php In IE7, the menu items are cut off on yours.   Glen  On 10/7/06, TJ <[EMAIL PROTECTED]> wrote: Hi, I am trying to make a drop down menu. I have half of it but I need a sub menu off to the left. I am using this jquery code. $(document).ready(function(){   $("#nav-one li").hover(   function(){ $("ul", this).fadeIn("slow"); },   function() { }    );   if (document.all) {   $("#nav-one li").hoverClass ("sfHover");   }   $("#subnav li").hover(    function(){ $("ul", this).fadeIn("slow"); },   function() { }   );   if (document.all) {   $("#subnav li").hoverClass ("sfHover");    } });   $.fn.hoverClass = function(c) {   return this.each(function(){   $(this).hover(   function() { $(this).addClass(c);  },    function() { $(this).removeClass(c); }   );   });   };Here is the page it is one. http://www.tjshafer.com/cortek/Any ideas?Thanks, TJhttp://www.tjshafer.com/cortek/___ jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Capturing modifier key events

2006-10-07 Thread Blair McKenzie
I've found that I've had to add keydown to both document and body in order to detect ctrl and shift in both ie and ff.\$(document).add("body").keydown( function(e) {  var ctrl = e.keyCode == 16 || e.ctrlKey
;  var alt = e.keyCode == 18 || e.altKey;});BlairOn 10/5/06, Klaus Hartl <[EMAIL PROTECTED]
> wrote:Sam Collett schrieb:> In IE:> e.keyCode returns the same as 
e.charCode in Firefox> The keys keyCode detects in Firefox are not detected at all in IE (so> you cannot prevent copy/paste in text boxes for example)Sam, if you need that, maybe you can use oncopy/onbeforecopy in IE for
that...-- Klaus___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/

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