Re: [jQuery] mp3player plugin

2006-10-10 Thread David Duymelinck
I did send a link yesterday evening but i think it got lost in space :)

http://dlinck.d.googlepages.com/jquery

I will add some examples later today.

My main to do things are optimizing the code  by reusing the flash 
object string and check if the flash object can be styled with the style 
attribute alone.

Rafael Santos schreef:
 pls show us the docs and the source again, i havent tagged it on 
 delicious yet.. =)
 and there may have new ppl on the list who would like to have it on 
 their gmail account.. hehehe

-- 
David Duymelinck

[EMAIL PROTECTED]


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


Re: [jQuery] Stopping animate() on command

2006-10-10 Thread Paul Bakaus
Good idea Stefan, this would help alot in further effects development. Maybe we can add a global object or method called something like $.queue, which does something like this:$.queue('click') = {0: {fx: animate params, state: '50%'}, 1: {animate params, state: '0%'}, 2: {animate params. state: '0%'} }
methods could be:$.queue('click', 'next')$.queue('click', 'stop')...2006/10/9, Stefan Petre [EMAIL PROTECTED]
:


  
  


Paul Bakaus wrote:
Hi there,
  
I'm currently searching for a good solution to stop jQuery's interal
function animate() when a new event occurs. A very basic example:
  
1. You have a moving div container which has a duration of 10 seconds,
it moves from left: 0px; to left: 500px.
  
2. Somewhere in your page there's a stop button, if you press it, the
animation will end before duration has ended.
  
I need it for a special case where I start a animation using a click,
and if I click again, the new animation should begin right away and the
old one cleared.
  
  
Any ideas?
  
-- 
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg
  
___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
  

Yeah, I faced a lot of situations where I needed some control over
events. I even open a ticket on this issue. I would like something like
end current queued effect, pause effect, dequeue the rest of events.
Maybe ending effect with some option, go to last step, go to first
step etc. I faced the problem on fisheye menu and tooltips.




___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/-- Paul BakausWeb DeveloperHildastr. 3579102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] dimensions.js

2006-10-10 Thread Franck Marcia
Hi,

What's the status of dimensions.js?

I mean, in SVN, it's located where it should be built-in but the build
process doesn't take it into account.

On the other hand, if it's a plugin, it should reside in the directory
plugins.

Franck.

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


[jQuery] Find the XPath of an element?

2006-10-10 Thread Phillip B Oldham




Hi guys

If I were to pass a P tag to $(), is there a way I could find its
location in the DOM and return an XPath _expression_?

For example:

xpath = $(this).getXPathLocation(); // equates to:
/html/body/div[2]/p[1]

Is this possible in the current source, or will I have to create a
recursive function to find an element's position and its parent?

-- 
Phillip
B Oldham 

kilo75 ltd
a: Round Foundry Media Centre, Foundry St, Leeds, LS11 5QP
t: +44 (0) 870 420 2410
e: [EMAIL PROTECTED]
w: //kilo75.com/

Policies

This e-mail and its attachments are intended for the above
named
recipient(s) only and may be confidential. If they have come to you 
in error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them
to anyone.
This e-mail has been created in the knowledge that Internet
e-mail
is not a 100% secure communications medium, and we have taken
steps to ensure that this e-mail and attachments are free from any 
virus. We must advise that in keeping with good computing practice 
the recipient should ensure they are completely virus free, and that
you understand and observe the lack of security when e-mailing us.





begin:vcard
fn:Phillip Oldham
n:Oldham;Phillip
email;internet:[EMAIL PROTECTED]
tel;work:+44 (0) 113 240 5566
tel;fax:+44 (0) 113 240 5566
version:2.1
end:vcard

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


Re: [jQuery] new jquery breaks $(document).load ?

2006-10-10 Thread Sebastian Busch
Hi,

 i'm currently developing a site for which jQuery has proven to be more
 than useful. the problem is that I updated the .js (I'm using the
 compressed one) since I was having problems with the Interface plugin
 (jQuery is not defined). however, now the page won't execute whats
 inside the $(document).load function.

I had the same problem. don't know why $(document).load() does not work
anymore.

Some of my code has to wait until all images are loaded, so i need
load() and cannot replace this with ready().

As some others already pointed out you can use

  $(window).load()

as a drop-in replacement for $(document).load() (at least according to
my tests)

-- 
cu
Sebastian


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


Re: [jQuery] Performance question

2006-10-10 Thread Christof Donat
Hi,

  It's as if when the id selector is passed then the $ method just uses a
  document.getElementById.

 Well IDs are supposed to be unique throughout the entire document (i.e.
 there can be one and only one element in the entire document with an ID of
 myId), so why shouldn't it simply use document.getElementById?

Well, you might whant to work with an element only if it is inside another 
one, which you already have:

div id=IamAllreadyKnowndiv id=42asdf/div/div

$('#42',known) - should find one Element

div id=IamAllreadyKnown/divdiv id=42asdf/div

$('#42',known) - should find no Elements

Christof

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


Re: [jQuery] change img src

2006-10-10 Thread Mika Tuupola

On Oct 10, 2006, at 12:18, Hannah Gray wrote:

 This is probably a very simple question, and I may be going about  
 the problem entirely the wrong way.  Corrections and ideas are very  
 welcome.

Try something like:

-cut-
 $(#toggle_name).toggle(function(e) {
 $('#container_name:visible').hide('slow');
 $('#toggle_name').src('assets/images/expand.gif')
 }, function(e) {
 $('#container_name:hidden').show('slow');
 $('#toggle_name').src('assets/images/retract.gif');
 });
-cut-

-- 
Mika Tuupola
http://www.appelsiini.net/~tuupola/



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


Re: [jQuery] jQuery Browser Detection

2006-10-10 Thread Sam Collett
On 09/10/06, Brian Miller [EMAIL PROTECTED] wrote:
 Sam, if that's a problem with your user base, then there are issues that
 go beyond the technical.  If my users were that hackish and black-hatted,
 I wouldn't be giving them any front-end code at all if I could avoid it.
 I mean, if people are technically savvy enough to change their user agent
 string, what stops them from overriding the functions that you provide, as
 well?

 I say, we split the difference.  Leave jquery's browser detection as is,
 and offer jUntrustworthy as a plugin, which overrides the original
 implementation with one that uses object detection.

 - Brian

Perhaps I was being a bit paranoid. Most users don't change the user
agent, so perhaps this would be better suited as a plugin and the
current implementation left as it is. It is the rendering engine that
is important, not the browser itself (and all IE-based browsers have
MSIE in).

There could always be a plugin that is more specific (which version of
IE, AOL, Firefox etc) for working around bugs/crashes etc.

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


Re: [jQuery] change img src

2006-10-10 Thread Hannah Gray
Thanks for the suggestion.  I was avoiding this option because it assumes the layer is visible in the first place, or, rather, it requires you to hard code the toggle order to match the initial hidden/visible schema. This is part of a much larger CMS and I can't count on the div starting off as visible every time.  See "car name" now for an example of what happens if the layer is hidden via CSS -- the first click of the show/hide icon produces no result.On Oct 10, 2006, at 2:28 AM, Mika Tuupola wrote:     $("#toggle_name").toggle(function(e) {          $('#container_name:visible').hide('slow');          $('#toggle_name').src('assets/images/expand.gif')      }, function(e) {          $('#container_name:hidden').show('slow');          $('#toggle_name').src('assets/images/retract.gif');      }); ___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] New Plugin: Xpander

2006-10-10 Thread Sam Collett
On 09/10/06, Jeffrey McClure [EMAIL PROTECTED] wrote:
 Here is a demo of the plugin in action:

 Example:
 http://labs.activespotlight.net/jQuery/Xpander.html

 Plugin Source:
  http://labs.activespotlight.net/resources/js/Xpander.js

 Overview Page:
 http://jquery.com/docs/Plugins/Xpander/

 ---
 Jeffrey


That's pretty good. How about having the ability to add parameters to the link?

For example, the link may be to 'foo.php', but you may wish to append
'?contentonly=true' which is handled by the linked page to return only
the content. As a normal link it returns the page with navigation,
headers etc, but when Xpanded you don't get any of that.

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


Re: [jQuery] typeof color == array in interface/highlight.js

2006-10-10 Thread Webunity | Gilles van den Hoven
Eckhard Rotte wrote:
 Hi there,

 there seems to be a bug in the interface/highlight.js plugin.
 Setting the color option as an array doesn't work because the array detection
   
Hi Eckhard, good catch!

I fixed this in my SVN version, but do you have a test page, so i can 
test the fix before i commit something?

Thanx

Gilles

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


Re: [jQuery] change img src

2006-10-10 Thread Christian Bach
Hannah Gray wrote:
 This is probably a very simple question, and I may be going about the 
 problem entirely the wrong way.  Corrections and ideas are very welcome.
 
 Basically, the below code functions to hide and show divs very nicely, 
 but it only changes the image source on hide, not show.

Perhaps something like this?

$('#toggle_year').click(function(){

var layer = $('#container_year);
var icon = this;

if(layer.is(:visible)) {
//hide layer
layer.hide('slow');
//swap icon
icon.src('changeme.gif');
} else {
//show layer
layer.show('slow');
icon.src('changeme');
}   
});

/christian

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


Re: [jQuery] Form plugin: default method

2006-10-10 Thread Webunity | Gilles van den Hoven
Sam Collett wrote:
 Is it the default on all browsers? If so, then perhaps that would be a
 good idea.
   
I agree with Klaus, all resources i found point that GET is the default 
method.

-- Gilles

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


Re: [jQuery] Form plugin: default method

2006-10-10 Thread Klaus Hartl


Sam Collett schrieb:
 On 10/10/06, Klaus Hartl [EMAIL PROTECTED] wrote:
 Hi,

 the objective of the form plugin is to completely mirror the behavior of
 a standard form.

 Therefore I propose the default method should be 'GET' as it is the case
 for a form in HTML:

 line 50:

 var mth = mth || f.method || 'POST';

 should be changed to:

 var mth = mth || f.method || 'GET';


 Agreed?


 -- Klaus
 
 Is it the default on all browsers? If so, then perhaps that would be a
 good idea.


If not, it would be a bug. From the HTML spec:

method = get|post [CI]
 This attribute specifies which HTTP method will be used to submit 
the form data set. Possible (case-insensitive) values are get (the 
default) and post. See the section on form submission for usage 
information.

http://www.w3.org/TR/html4/interact/forms.html#h-17.3


-- Klaus


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


Re: [jQuery] Question on jQuery 1.0.2

2006-10-10 Thread Brandon Aaron
I would also like to know what the 2 is for. I didn't know
getAttribute() could take a second param.

--
Brandon Aaron

On 10/9/06, Stephen Woodbridge [EMAIL PROTECTED] wrote:
 Hi all,

 I was testing and found some very strange behavior in IE6 and Opera 9
 but works fine on FF 1.0.5. It looks like the problem is pointing to:

 line: 704
 return elem.getAttribute( name, 2 );

 in this block of code:

 ...
  } else if ( elem.getAttribute != undefined ) {
 alert(name +  =  + value);
  if ( value != undefined ) elem.setAttribute( name, value );
  return elem.getAttribute( name, 2 );
  } else {
 ...



 Is this correct?
 What does the 2nd argument do?

 -Steve

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


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


Re: [jQuery] Question on jQuery 1.0.2

2006-10-10 Thread Klaus Hartl

Brandon Aaron schrieb:
 I would also like to know what the 2 is for. I didn't know
 getAttribute() could take a second param.

It's a microsoft extension indicating case-sensitivity. If set to 1 it 
forces case-sensitivity, so obviously setting it to 2 is the same as 
leaving it out.

I wonder why this is still in there.



-- Klaus

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


Re: [jQuery] Question on jQuery 1.0.2

2006-10-10 Thread Antonio Collins
Second parameter is search type. 
vAttrValue = object.getAttribute(sAttrName [, iFlags])

sAttrName Required. String that specifies the name of the attribute. 

iFlags Optional. Integer that specifies one or more of the following flags: 
0 Default. Performs a property search that is not case-sensitive, and
returns an interpolated value if the property is found. 
1 Performs a case-sensitive property search. To find a match, the uppercase
and lowercase letters in sAttrName must exactly match those in the attribute
name. 
2 Returns the value exactly as it was set in script or in the source
document. 
  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Brandon Aaron
Sent: Tuesday, October 10, 2006 8:24 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Question on jQuery 1.0.2

I would also like to know what the 2 is for. I didn't know
getAttribute() could take a second param.

--
Brandon Aaron

On 10/9/06, Stephen Woodbridge [EMAIL PROTECTED] wrote:
 Hi all,

 I was testing and found some very strange behavior in IE6 and Opera 9 
 but works fine on FF 1.0.5. It looks like the problem is pointing to:

 line: 704
 return elem.getAttribute( name, 2 );

 in this block of code:

 ...
  } else if ( elem.getAttribute != undefined ) { alert(name +  
 =  + value);
  if ( value != undefined ) elem.setAttribute( name, value );
  return elem.getAttribute( name, 2 );
  } else {
 ...



 Is this correct?
 What does the 2nd argument do?

 -Steve

 ___
 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] GetAttribute mystery argument

2006-10-10 Thread Dave Methvin
Here's the Microsoft doc for it:
http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/getattribu
te.asp
 


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


Re: [jQuery] IE7 and document.ready

2006-10-10 Thread Brian Miller
Yes, $(document).ready() should only happen once - when the document is
first ready.  What you're using for magic would infuriate developers on
most other projects!  :)

You should have a separate function for an ajax callback to do whatever
you're doing, even if it's the same code, and you're reusing the same
Function object for it.

- Brian


 Webunity | Gilles van den Hoven schrieb:
 Hi Guys,

 Just found another document.ready bug at least i hope it is a bug :)

 The document.ready is not firing in IE7 when loading content via ajax
 into a DIV. Is this a common problem which is allready known? Someone
 might have a fix for this?

 The current scenario fires succesfully in both firefox and IE6 just
 like i want it to be and is like this:
 - I load some javascripts in the header of the page, in those headers
 are document.readys
 - When i load new data into a div, i want the document.readys to fire
 again, since they do some jQuery magic

 As said, this scenario successfully works in both Firefox 1.5.0.2 and
 IE6, just like i want it to do, but fails in IE7.

 Hope someone can help me.
 It's weird that it works in IE6 and FF. So far, the solution to this
 problem was to execute the document ready code in an ajax callback...

 -- Jörn

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




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


Re: [jQuery] animate problem

2006-10-10 Thread Klaus Hartl


David Duymelinck schrieb:
 i know somewhere in the list there is a solution but i can't find it at 
 the moment.
 
 I want to pass the animate hash as an option so i don't need to go into 
 the plugin to change the animation effects.
 
 $('#test').plugin({anihide: {opacity: 'hide'}, anishow: {opacity: 
 'show'}, anitime: 3000});
 
 $.fn.test = function(options){
 var anihide = options.anihide;
 var anishow = options.anishow;
 var anitime = options.anitime;
 $(img).siblings(img:visible).animate(anihide, 
 anitime).end().animate(anishow, anitime);
 }
 
 The last line is from the actual plugin, the other code is pseudo code. 
 But i think you can understand the point i'm trying to make.
 When i alert anihide the first time i get the opacity value but the 
 second time i get true as value.
 


I ran into the same problem with the tabs plugin. The original object is 
modified for the animation, so as a workaround I copy the object each 
time before passing it to animate:


$.fn.test = function(options){
 var anihide = $.extend({}, options.anihide); // copy object
 var anishow = $.extend({}, options.anishow);
 var anitime = options.anitime;
 $(img).siblings(img:visible).animate(anihide, 
anitime).end().animate(anishow, anitime);
;

Jörn has already filed a ticket for this:
http://jquery.com/dev/bugs/bug/237/

-- Klaus

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


Re: [jQuery] Queueing of effects (fx)

2006-10-10 Thread Abdur-Rahman Advany
Thnx, I dived into the code and saw how nicely jQuery handled the queue. 
It was easy to extend it with a limit option. I made a plugin out of 
it

 * [http://jquery.com/docs/Plugins/limitQueue/] - it allows you to 
specify the limit of queue. This is especially useful when two opposite  
effects interact on one DOM element.

Abdul
 
John Resig wrote:
 I believe that jQuery has a sort of built in queue in that effects are
 chainable. So you'd simply write all of the effects in one long chain and
 each of them would happen in the order you specify in your chain.
 

 Exactly, so doing:

 $(#foo).slideDown('slow').slideUp('slow');

 will be queued completely.

 --John

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

   


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


Re: [jQuery] jQuery Browser Detection

2006-10-10 Thread Brian Miller
There's always the Ultimate Browser Sniffer.  The most updated version
does involve some object detection, but mostly still chops up the user
agent string.  It also detects the version of JS.
http://www.webreference.com/tools/browser/javascript.html
View source on the page to see the current script.

It's big, but probably not that bad when packed (although, you might have
to lint it and pick out the little things for it to pack successfully).

- Brian


 On 09/10/06, Brian Miller [EMAIL PROTECTED] wrote:
 Sam, if that's a problem with your user base, then there are issues that
 go beyond the technical.  If my users were that hackish and
 black-hatted,
 I wouldn't be giving them any front-end code at all if I could avoid it.
 I mean, if people are technically savvy enough to change their user
 agent
 string, what stops them from overriding the functions that you provide,
 as
 well?

 I say, we split the difference.  Leave jquery's browser detection as is,
 and offer jUntrustworthy as a plugin, which overrides the original
 implementation with one that uses object detection.

 - Brian

 Perhaps I was being a bit paranoid. Most users don't change the user
 agent, so perhaps this would be better suited as a plugin and the
 current implementation left as it is. It is the rendering engine that
 is important, not the browser itself (and all IE-based browsers have
 MSIE in).

 There could always be a plugin that is more specific (which version of
 IE, AOL, Firefox etc) for working around bugs/crashes etc.

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




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


Re: [jQuery] Form plugin: default method

2006-10-10 Thread Mike Alsup
 Therefore I propose the default method should be 'GET' as it is the case
 for a form in HTML:

Good catch, Klaus.

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


Re: [jQuery] animate problem

2006-10-10 Thread David Duymelinck
Klaus Hartl schreef

 I ran into the same problem with the tabs plugin. The original object is 
 modified for the animation, so as a workaround I copy the object each 
 time before passing it to animate:


 $.fn.test = function(options){
  var anihide = $.extend({}, options.anihide); // copy object
  var anishow = $.extend({}, options.anishow);
  var anitime = options.anitime;
  $(img).siblings(img:visible).animate(anihide, 
 anitime).end().animate(anishow, anitime);
 ;

 Jörn has already filed a ticket for this:
 http://jquery.com/dev/bugs/bug/237/

 -- Klaus

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


   
i was also thinking about copying the object but in a more basic version :)

 var anihide = options.anihide;
 var anihide2 = anihide;
 $(img).siblings(img:visible).animate(anihide2, 
anitime).end().animate(anishow, anitime);
;

But that didn't work and i regret to say your workaround didn't work either. :( 
 

I downloaded the uncompressed jquery and according to firebug the error is 
situated in lines 91, 344, 979, 1350, 1359, 1370 and 1380. But that is after 
the anihide object is set to true so i don't know if it's useful information.

If i find another way to avoid this i will let you know.

-- 
David Duymelinck

[EMAIL PROTECTED]


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


Re: [jQuery] Question on jQuery 1.0.2

2006-10-10 Thread Stephen Woodbridge
As Klaus mentioned it looks like a Microsoft extension.

http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/getattribute.asp

http://www.w3.org/TR/2000/WD-DOM-Level-1-2929/DOM.txt

And oddly enough, IE6 is throwing an error that points to line 702 in 
jQuery, which is this line. You can reproduce this at:

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

and double click on the map in IE6.

-Steve

Antonio Collins wrote:
 Second parameter is search type. 
 vAttrValue = object.getAttribute(sAttrName [, iFlags])
 
 sAttrName Required. String that specifies the name of the attribute. 
 
 iFlags Optional. Integer that specifies one or more of the following flags: 
 0 Default. Performs a property search that is not case-sensitive, and
 returns an interpolated value if the property is found. 
 1 Performs a case-sensitive property search. To find a match, the uppercase
 and lowercase letters in sAttrName must exactly match those in the attribute
 name. 
 2 Returns the value exactly as it was set in script or in the source
 document. 
   
 
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Brandon Aaron
 Sent: Tuesday, October 10, 2006 8:24 AM
 To: jQuery Discussion.
 Subject: Re: [jQuery] Question on jQuery 1.0.2
 
 I would also like to know what the 2 is for. I didn't know
 getAttribute() could take a second param.
 
 --
 Brandon Aaron
 
 On 10/9/06, Stephen Woodbridge [EMAIL PROTECTED] wrote:
 Hi all,

 I was testing and found some very strange behavior in IE6 and Opera 9 
 but works fine on FF 1.0.5. It looks like the problem is pointing to:

 line: 704
 return elem.getAttribute( name, 2 );

 in this block of code:

 ...
  } else if ( elem.getAttribute != undefined ) { alert(name +  
 =  + value);
  if ( value != undefined ) elem.setAttribute( name, value );
  return elem.getAttribute( name, 2 );
  } else {
 ...



 Is this correct?
 What does the 2nd argument do?

 -Steve

 ___
 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/


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


Re: [jQuery] animate problem

2006-10-10 Thread Jörn Zaefferer
Hi David!

 I want to pass the animate hash as an option so i don't need to go into 
 the plugin to change the animation effects.
 
 $('#test').plugin({anihide: {opacity: 'hide'}, anishow: {opacity: 
 'show'}, anitime: 3000});
 
 $.fn.test = function(options){
 var anihide = options.anihide;
 var anishow = options.anishow;
 var anitime = options.anitime;
 $(img).siblings(img:visible).animate(anihide, 
 anitime).end().animate(anishow, anitime);
 }
 
 The last line is from the actual plugin, the other code is pseudo code. 
 But i think you can understand the point i'm trying to make.
 When i alert anihide the first time i get the opacity value but the 
 second time i get true as value.

This is a known problem: http://jquery.com/dev/bugs/bug/237/

The workaround is to clone the hash before you pass it to animate, eg:
$().animate($.extend({}, hash), 5);

Klaus Hartl's tabs plugin has the same issue. If the above does not work, take 
a peek at his code: http://stilbuero.de/jquery/tabs/

-- Jörn
-- 
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl

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


Re: [jQuery] animate problem

2006-10-10 Thread Klaus Hartl

 i was also thinking about copying the object but in a more basic version :)
 
  var anihide = options.anihide;
  var anihide2 = anihide;
  $(img).siblings(img:visible).animate(anihide2, 
 anitime).end().animate(anishow, anitime);
 ;
 
 But that didn't work and i regret to say your workaround didn't work either. 
 :(  
 
 I downloaded the uncompressed jquery and according to firebug the error is 
 situated in lines 91, 344, 979, 1350, 1359, 1370 and 1380. But that is after 
 the anihide object is set to true so i don't know if it's useful information.
 
 If i find another way to avoid this i will let you know.
 

Maybe you didn't copy it in the right place... see it has to be copied 
every time animate is called.

In the tabs plugin that looks something like:

jQuery.fn.tabs = function(options) {

 // copying here from options is not sufficient...

 return this.each(function() {
 jQuery('a').click(function() {
 // 1. copy objects
 // 2. call animate...
 });
 });

};

Would be great if this bug is fixed, because I could completely move 
that out from the click event making the whole thing perform better I 
guess...

-- Klaus

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


Re: [jQuery] IE7 and document.ready

2006-10-10 Thread Mike Alsup
Can you post a test page because that sure doesn't happen for me.

Mike

 Ok then jQuery is broken ;)

 $(document).ready() fires each time i load new ajax content in both FF
 and IE (lower than 7)

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


[jQuery] $document.ready NOT broken

2006-10-10 Thread Webunity | Gilles van den Hoven
Seems like the problem lies in another place, not in the document.ready 
part..
Going to investigate this further

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


Re: [jQuery] IE7 and document.ready

2006-10-10 Thread Brandon Aaron
$(document).ready() will immediately fire functions passed in after
the $(document).ready() function has already been called. Or at least
that is what the code says it should do.

--
Brandon Aaron


On 10/10/06, Mike Alsup [EMAIL PROTECTED] wrote:
 Can you post a test page because that sure doesn't happen for me.

 Mike

  Ok then jQuery is broken ;)
 
  $(document).ready() fires each time i load new ajax content in both FF
  and IE (lower than 7)

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


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


Re: [jQuery] typeof color == array in interface/highlight.js

2006-10-10 Thread Eckhard Rotte
Hi Gilles,

 I fixed this in my SVN version, but do you have a test page, so i can
 test the fix before i commit something?

Heres a modified copy of Stefans highlight demo page:

http://test.webdebug.de/tmp/jquery/highlight_colorarray.html


regards,
Eckhard

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


Re: [jQuery] IE7 and document.ready

2006-10-10 Thread Webunity | Gilles van den Hoven
Mike Alsup wrote:
 Can you post a test page because that sure doesn't happen for me.

 Mike
   
I've tracked down the problem to IE7 in standalone mode. I am almost 
certain that that is the problem. It sometimes just keeps hanging on (1 
item remaining) and thus not firing the $(document).ready() part.

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


Re: [jQuery] animate problem

2006-10-10 Thread Brandon Aaron
If I understand the issue correctly changing this line (#318) in fx.js:
this.curAnim = prop;
to this;
this.curAnim = jQuery.extend({}, prop);

Should fix the problem. However, I have no test case to run this against.

--
Brandon Aaron

On 10/10/06, Klaus Hartl [EMAIL PROTECTED] wrote:

  i was also thinking about copying the object but in a more basic version :)
 
   var anihide = options.anihide;
   var anihide2 = anihide;
   $(img).siblings(img:visible).animate(anihide2,
  anitime).end().animate(anishow, anitime);
  ;
 
  But that didn't work and i regret to say your workaround didn't work 
  either. :(
 
  I downloaded the uncompressed jquery and according to firebug the error is 
  situated in lines 91, 344, 979, 1350, 1359, 1370 and 1380. But that is 
  after the anihide object is set to true so i don't know if it's useful 
  information.
 
  If i find another way to avoid this i will let you know.
 

 Maybe you didn't copy it in the right place... see it has to be copied
 every time animate is called.

 In the tabs plugin that looks something like:

 jQuery.fn.tabs = function(options) {

  // copying here from options is not sufficient...

  return this.each(function() {
  jQuery('a').click(function() {
  // 1. copy objects
  // 2. call animate...
  });
  });

 };

 Would be great if this bug is fixed, because I could completely move
 that out from the click event making the whole thing perform better I
 guess...

 -- Klaus

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


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


Re: [jQuery] typeof color == array in interface/highlight.js

2006-10-10 Thread Webunity | Gilles van den Hoven
Hi Eckhard,

I've commited my fix to SVN, can you get the new ifxhighlight.js from 
SVN and test that with your page?

Thanx

Gilles

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


Re: [jQuery] animate problem

2006-10-10 Thread Klaus Hartl


Brandon Aaron schrieb:
 If I understand the issue correctly changing this line (#318) in fx.js:
 this.curAnim = prop;
 to this;
 this.curAnim = jQuery.extend({}, prop);
 
 Should fix the problem. However, I have no test case to run this against.

Yes, that looks good I think. Mike once pointed out that $.extend does 
only a shallow copy , so if the animate hash is going to be changed to 
hold another object as a value we will run into new problems. This is 
not very likely, but we should keep that in mind...


-- Klaus

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


Re: [jQuery] animate problem

2006-10-10 Thread Brandon Aaron
If someone can send me a test case I'd be more than happy to commit this to SVN.

--
Brandon Aaron

On 10/10/06, Klaus Hartl [EMAIL PROTECTED] wrote:


 Brandon Aaron schrieb:
  If I understand the issue correctly changing this line (#318) in fx.js:
  this.curAnim = prop;
  to this;
  this.curAnim = jQuery.extend({}, prop);
 
  Should fix the problem. However, I have no test case to run this against.

 Yes, that looks good I think. Mike once pointed out that $.extend does
 only a shallow copy , so if the animate hash is going to be changed to
 hold another object as a value we will run into new problems. This is
 not very likely, but we should keep that in mind...


 -- Klaus

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


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


Re: [jQuery] typeof color == array in interface/highlight.js

2006-10-10 Thread Webunity | Gilles van den Hoven

 Yep, works.

 Theres some debug code left:
 
 .constructor==Array
 
   
Good catch, totally missed that one ;)

Anyway, the new (fixxed) version is in SVN

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


[jQuery] New Plugin: jMP3

2006-10-10 Thread Sean O

Hi,


I've created a new jQuery plugin, jMP3, to easily make MP3s playable
directly on most any web site.

Information, demos and code:
http://www.sean-o.com/jquery/jmp3/

Let me know what you think.  It's my first plugin, so be gentle!


SEAN O
-- 
View this message in context: 
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Andy Matthews
Very nice. Good looking as well. A comment.

- I know that this is probably a user thing, but you need to implement the
IE Flash fix on your examples. You might even consider merging it in with
your codebase.

!//--
andy matthews
web developer
certified advanced coldfusion programmer
ICGLink, Inc.
[EMAIL PROTECTED]
615.370.1530 x737
--//-

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Sean O
Sent: Tuesday, October 10, 2006 9:18 AM
To: discuss@jquery.com
Subject: [jQuery] New Plugin: jMP3



Hi,


I've created a new jQuery plugin, jMP3, to easily make MP3s playable
directly on most any web site.

Information, demos and code:
http://www.sean-o.com/jquery/jmp3/

Let me know what you think.  It's my first plugin, so be gentle!


SEAN O
--
View this message in context:
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
Sent from the JQuery mailing list archive at Nabble.com.


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


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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Sean O

Hi Andy,

Thanks for the compliments.

The IE Flash Fix is a known issue -- the Eolas workaround I reference on
the plugin page under Plugin Information.  I've tried combinations of the
suggestions on http://jquery.com/docs/Cookbook/, but nothing seems to work. 
There are a few .js files that claim to get around this, but I'd rather not
have to include another script.


___
SEAN O



Andy Matthews wrote:
 
 Very nice. Good looking as well. A comment.
 
 - I know that this is probably a user thing, but you need to implement the
 IE Flash fix on your examples. You might even consider merging it in with
 your codebase.
 
 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Behalf Of Sean O
 Sent: Tuesday, October 10, 2006 9:18 AM
 To: discuss@jquery.com
 Subject: [jQuery] New Plugin: jMP3
 
 
 
 Hi,
 
 
 I've created a new jQuery plugin, jMP3, to easily make MP3s playable
 directly on most any web site.
 
 Information, demos and code:
 http://www.sean-o.com/jquery/jmp3/
 
 Let me know what you think.  It's my first plugin, so be gentle!
 
 
 SEAN O
 --
 View this message in context:
 http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6739721
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Kurt Mackey
Try replacing your eolas thing at the bottom of your loop with this:

If(jQuery.browser.msie){
$(this).html($(this).html());
}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Sean O
Sent: Tuesday, October 10, 2006 11:09 AM
To: discuss@jquery.com
Subject: Re: [jQuery] New Plugin: jMP3


Hi Andy,

Thanks for the compliments.

The IE Flash Fix is a known issue -- the Eolas workaround I reference
on
the plugin page under Plugin Information.  I've tried combinations of
the
suggestions on http://jquery.com/docs/Cookbook/, but nothing seems to
work. 
There are a few .js files that claim to get around this, but I'd rather
not
have to include another script.


___
SEAN O



Andy Matthews wrote:
 
 Very nice. Good looking as well. A comment.
 
 - I know that this is probably a user thing, but you need to implement
the
 IE Flash fix on your examples. You might even consider merging it in
with
 your codebase.
 
 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Behalf Of Sean O
 Sent: Tuesday, October 10, 2006 9:18 AM
 To: discuss@jquery.com
 Subject: [jQuery] New Plugin: jMP3
 
 
 
 Hi,
 
 
 I've created a new jQuery plugin, jMP3, to easily make MP3s playable
 directly on most any web site.
 
 Information, demos and code:
 http://www.sean-o.com/jquery/jmp3/
 
 Let me know what you think.  It's my first plugin, so be gentle!
 
 
 SEAN O
 --
 View this message in context:
 http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context:
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6739721
Sent from the JQuery mailing list archive at Nabble.com.


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

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


[jQuery] Slightly OT: How to organize your site's javscript?

2006-10-10 Thread Felix Geisendörfer




Hi everbody,

I've been using jQuery for a while and am pretty much in love with it -
as far as love for a JS library can go that is ; ).

But one of the things I recently tried to figure out for myself, is how
to organize ones _javascript_. I mean having a JS file with hundreds of
stand-alone functions seems pretty messy, so there got to be something
better. I just did a little
blog post  writing about my current approach of having a globally
available Singleton class that allows to structure an application's
functionality in a hierarchy while not having to deal with JS scoping
issues (or let's say the lag of knowledge about it ^^). While I like
the approach, I would love to hear about other people's strategies. I'm
not looking for a concept that would work for any kind of applications,
but I would deeply appreciate your guys help on compiling a list /
starting a discussion of best practices and conventions you use in your
projects. Since my readers are mostly PHP coders and no real JS guru's
like many of you guys here, I decided to post this message on this list
to get the chance for both of these worlds to meet. So either comments
on this list or on the blog post would be appreciated and I will most
likely write a sum-up in a couple of days, pointing out the most
interesting insides. I'm especially interested in jQuery'ish solutions
that play well with the CakePHP framework.

I hope this is not totally off topic / spam to you guys - otherwise I
apologize.

Best Regards,
Felix Geisendörfer
-- 
--
http://www.thinkingphp.org
http://www.fg-webdesign.de



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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Kurt Mackey
Oh wait, no, that won't work.  You'd need:

if(jQuery.browser.msie){
this.outerHTML = this.outerHTML;
}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kurt Mackey
Sent: Tuesday, October 10, 2006 11:16 AM
To: jQuery Discussion.
Subject: Re: [jQuery] New Plugin: jMP3

Try replacing your eolas thing at the bottom of your loop with this:

If(jQuery.browser.msie){
$(this).html($(this).html());
}

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Sean O
Sent: Tuesday, October 10, 2006 11:09 AM
To: discuss@jquery.com
Subject: Re: [jQuery] New Plugin: jMP3


Hi Andy,

Thanks for the compliments.

The IE Flash Fix is a known issue -- the Eolas workaround I reference
on
the plugin page under Plugin Information.  I've tried combinations of
the
suggestions on http://jquery.com/docs/Cookbook/, but nothing seems to
work. 
There are a few .js files that claim to get around this, but I'd rather
not
have to include another script.


___
SEAN O



Andy Matthews wrote:
 
 Very nice. Good looking as well. A comment.
 
 - I know that this is probably a user thing, but you need to implement
the
 IE Flash fix on your examples. You might even consider merging it in
with
 your codebase.
 
 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Behalf Of Sean O
 Sent: Tuesday, October 10, 2006 9:18 AM
 To: discuss@jquery.com
 Subject: [jQuery] New Plugin: jMP3
 
 
 
 Hi,
 
 
 I've created a new jQuery plugin, jMP3, to easily make MP3s playable
 directly on most any web site.
 
 Information, demos and code:
 http://www.sean-o.com/jquery/jmp3/
 
 Let me know what you think.  It's my first plugin, so be gentle!
 
 
 SEAN O
 --
 View this message in context:
 http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context:
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6739721
Sent from the JQuery mailing list archive at Nabble.com.


___
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: jMP3

2006-10-10 Thread Sam Collett
On 10/10/06, Sean O [EMAIL PROTECTED] wrote:

 Hi,


 I've created a new jQuery plugin, jMP3, to easily make MP3s playable
 directly on most any web site.

 Information, demos and code:
 http://www.sean-o.com/jquery/jmp3/

 Let me know what you think.  It's my first plugin, so be gentle!

 
 SEAN O

I would suggest that you use jQuery(...) instead of $(...) so as to
prevent possible conflicts in the future. It is mentioned on the
Plugins/Authoring (http://jquery.com/docs/Plugins/Authoring/) page
(although it could be more prominant).

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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Kurt Mackey
Ok, rather than keep guessing, I actually tried things out until one
worked.  Put this in place of your current eolas thing:

if(jQuery.browser.msie){
$(this).children('object').each(function(){
this.outerHTML = this.outerHTML;
});
}

Verified to work in IE6. :)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Sean O
Sent: Tuesday, October 10, 2006 11:09 AM
To: discuss@jquery.com
Subject: Re: [jQuery] New Plugin: jMP3


Hi Andy,

Thanks for the compliments.

The IE Flash Fix is a known issue -- the Eolas workaround I reference
on
the plugin page under Plugin Information.  I've tried combinations of
the
suggestions on http://jquery.com/docs/Cookbook/, but nothing seems to
work. 
There are a few .js files that claim to get around this, but I'd rather
not
have to include another script.


___
SEAN O



Andy Matthews wrote:
 
 Very nice. Good looking as well. A comment.
 
 - I know that this is probably a user thing, but you need to implement
the
 IE Flash fix on your examples. You might even consider merging it in
with
 your codebase.
 
 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Behalf Of Sean O
 Sent: Tuesday, October 10, 2006 9:18 AM
 To: discuss@jquery.com
 Subject: [jQuery] New Plugin: jMP3
 
 
 
 Hi,
 
 
 I've created a new jQuery plugin, jMP3, to easily make MP3s playable
 directly on most any web site.
 
 Information, demos and code:
 http://www.sean-o.com/jquery/jmp3/
 
 Let me know what you think.  It's my first plugin, so be gentle!
 
 
 SEAN O
 --
 View this message in context:
 http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context:
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6739721
Sent from the JQuery mailing list archive at Nabble.com.


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

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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Sean O

Kurt,


That worked a treat, thanks. .html() is what I had tried before.

I've updated the plugin to v0.2.1 (bugfix) based on yours  Sam's
suggestions.
http://www.sean-o.com/jquery/jmp3/

___
SEAN O



Kurt Mackey wrote:
 
 Oh wait, no, that won't work.  You'd need:
 
 if(jQuery.browser.msie){
   this.outerHTML = this.outerHTML;
 }
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Kurt Mackey
 Sent: Tuesday, October 10, 2006 11:16 AM
 To: jQuery Discussion.
 Subject: Re: [jQuery] New Plugin: jMP3
 
 Try replacing your eolas thing at the bottom of your loop with this:
 
 If(jQuery.browser.msie){
   $(this).html($(this).html());
 }
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Sean O
 Sent: Tuesday, October 10, 2006 11:09 AM
 To: discuss@jquery.com
 Subject: Re: [jQuery] New Plugin: jMP3
 
 
 Hi Andy,
 
 Thanks for the compliments.
 
 The IE Flash Fix is a known issue -- the Eolas workaround I reference
 on
 the plugin page under Plugin Information.  I've tried combinations of
 the
 suggestions on http://jquery.com/docs/Cookbook/, but nothing seems to
 work. 
 There are a few .js files that claim to get around this, but I'd rather
 not
 have to include another script.
 
 
 ___
 SEAN O
 
 
 
 Andy Matthews wrote:
 
 Very nice. Good looking as well. A comment.
 
 - I know that this is probably a user thing, but you need to implement
 the
 IE Flash fix on your examples. You might even consider merging it in
 with
 your codebase.
 
 !//--
 andy matthews
 web developer
 certified advanced coldfusion programmer
 ICGLink, Inc.
 [EMAIL PROTECTED]
 615.370.1530 x737
 --//-
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Behalf Of Sean O
 Sent: Tuesday, October 10, 2006 9:18 AM
 To: discuss@jquery.com
 Subject: [jQuery] New Plugin: jMP3
 
 
 
 Hi,
 
 
 I've created a new jQuery plugin, jMP3, to easily make MP3s playable
 directly on most any web site.
 
 Information, demos and code:
 http://www.sean-o.com/jquery/jmp3/
 
 Let me know what you think.  It's my first plugin, so be gentle!
 
 
 SEAN O
 --
 View this message in context:
 http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6739721
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 ___
 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/
 
 

-- 
View this message in context: 
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6740701
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] animate problem

2006-10-10 Thread Jörn Zaefferer
Brandon Aaron schrieb:
 If someone can send me a test case I'd be more than happy to commit this to 
 SVN.
   
Just add something like this to animate:
@test stop();
var hash = {opacity: 'hide'};
var hashCopy = $.extend({}, hash);
$('#foo').animate(hash, 'fast', function() {
  ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the 
hash parameter' );
  start();
});

Using stop() and start() like that is necessary to test the asynchronous 
code. I'm not sure wheather that comparision suffices. Just run it 
against the current code to see if it fails.

-- Jörn

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


[jQuery] Load problem

2006-10-10 Thread Glen Lipka
Just updated to 1.0.2. I am not sure what I am doing wrong on this page.http://glenlipka.kokopop.com/jQuery/slideMenu.htm - this one works. I explicitly put the divs on the page.
http://glenlipka.kokopop.com/jQuery/slideMenu/slideMenu.htm - this one does not work. In this one, I am trying to make the footprint zero so that all the different people who will use this only need to add the jQuery library and the 1 script and the 1 css. Although I'd like to append the CSS too in the script. 
What am I doing wrong? Suggestions for being more effecient?This will get used by alot of our sites in the next 4 months if I can nail it.Thanks,Glen
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] ajax bug or I am really confused?

2006-10-10 Thread Ian Struble
This fix is no longer needed.  I tracked down the reason for why we
have this work around and you are correct that it is because there is
a work around for a firefox bug in Prototype.  We lost the comment
referencing it in the 89 - 93 checkin of src\ajax.js.

Here is the FF bug that this code is working around:
  https://bugzilla.mozilla.org/show_bug.cgi?id=246651

The workarounds in both Prototype and jQuery have spawned quite a few
FF bugs that have been marked as duplicate.  This FF bug even mentions
the bug filed with Prototype to fix or update the work around to only
fire for pre-1.5 FF browsers:
  https://bugzilla.mozilla.org/show_bug.cgi?id=331210

Here is the Prototype bug to remove or update the work around to only
target pre-1.5 FF browsers:
  http://dev.rubyonrails.org/ticket/5809

Should I file a jQuery bug to fix it?  Here is a patch for my current
work around.  Not very pretty but it works for me.

Ian

Index: ajax.js
===
--- ajax.js (revision 413)
+++ ajax.js (working copy)
@@ -652,8 +652,12 @@
xml.setRequestHeader(X-Requested-With, XMLHttpRequest);

// Make sure the browser sends the right content length
-   if ( xml.overrideMimeType )
+   if ( xml.overrideMimeType  jQuery.browser.mozilla ) {
+   // bug fixed in rev 1.5 - bug #246651
+   var rev = navigator.userAgent.match(/rv:(\d+(?:\.\d+)+)/);
+   if ( rev  rev  1.5 )
xml.setRequestHeader(Connection, close);
+   }

// Wait for a response to come back
var onreadystatechange = function(istimeout){



On 9/28/06, Klaus Hartl [EMAIL PROTECTED] wrote:


 Ⓙⓐⓚⓔ schrieb:
  line 1691 of latest jquery   * $Rev: 249 $
 
 
// Make sure the browser sends the right content length
if ( xml.overrideMimeType )
  xml.setRequestHeader(Connection, close);
 
 
  should probably read:
 
xml.overrideMimeType('text/xml');
 
  At least that is how I want it. Overriding html mime type lets files
  served as 'html' to be used in $('body',xml) type expressions.
 
 


 These lines seem to be ok, they are supposed to fix this bug:

 https://bugzilla.mozilla.org/show_bug.cgi?query_format=specificorder=relevance+descbug_status=__open__id=246651


 Prototype has this fix as well:
 http://dev.rubyonrails.org/ticket/3564


 -- Klaus

 ___
 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-10 Thread Jörn Zaefferer
Christof Donat schrieb:
 It's as if when the id selector is passed then the $ method just uses a
 document.getElementById.
   
 Well IDs are supposed to be unique throughout the entire document (i.e.
 there can be one and only one element in the entire document with an ID of
 myId), so why shouldn't it simply use document.getElementById?
 

 Well, you might whant to work with an element only if it is inside another 
 one, which you already have:
   
Unfortnuately, getElementById exists only for the document object, 
therefore you can't just say context.getElementById(...). I think this 
is the reason why jQuery can't help you there.

-- Jörn

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


Re: [jQuery] IE7 and document.ready

2006-10-10 Thread Jörn Zaefferer
Brandon Aaron schrieb:
 $(document).ready() will immediately fire functions passed in after
 the $(document).ready() function has already been called. Or at least
 that is what the code says it should do.
   
Good point. Maybe this should be added to the documentation for the 
ready event.

-- Jörn

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


Re: [jQuery] Interface Elements Autocomplete no longer available in Interface lib download...

2006-10-10 Thread Jörn Zaefferer
Hi Stefan!
 OT: This changes in jQuery have impact in 3 major projects in my 
 company. I'm one step away to switch to YUI.
   
Could you explain what changes exactly were the problem? The goal of the 
1.0.2 release was to provide bug fixes without changing the API and 
therefore not breaking code.
My guess: As you have a lot of experience with the jQuery internals, 
your code broke because you relied heavily on those internals. In this 
case, it would be, too, important to know what changes broke your code.

-- Jörn

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


Re: [jQuery] Load problem

2006-10-10 Thread Karl Swedberg
Hi Glen,When I put "jQueryGlobalFunctions();" into FireBug, I got "False." I'm guessing that your "return false" inside toggle() is in the wrong place. Try putting it right after $("img.handle").src("images/barHandleup.gif"); and $("img.handle").src("images/barHandledown.gif"); and remove it from where it is two lines below $("img.handle").src("images/barHandledown.gif");worth a shot?Karl___Karl Swedbergwww.englishrules.comwww.learningjquery.com On Oct 10, 2006, at 1:16 PM, Glen Lipka wrote:Just updated to 1.0.2.  I am not sure what I am doing wrong on this page.http://glenlipka.kokopop.com/jQuery/slideMenu.htm - this one works.  I explicitly put the divs on the page. http://glenlipka.kokopop.com/jQuery/slideMenu/slideMenu.htm - this one does not work.  In this one, I am trying to make the footprint zero so that all the different people who will use this only need to add the jQuery library and the 1 script and the 1 css.  Although I'd like to append the CSS too in the script.  What am I doing wrong? Suggestions for being more effecient?This will get used by alot of our sites in the next 4 months if I can nail it.Thanks,Glen___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Fix for IE XML nested each issues (Bug #164)

2006-10-10 Thread Peter Woods
The current version of jQuery has trouble when trying to access methods such as text() or parent() or attr() inside an each statement within the context of an XML document. For a test case, see 

Bug #164. The general assumption with this bug has been that the problem lies in methods such as text(), and therefore it would be impossible to determine whether the object in question was an XML object or a HTML object and act on it accordingly. While this bug has been closed, it is crucial for what I'm using jQuery for, so I decided to debug it and have found a simple yet (as far as I can tell) effective solution to the bug which works in both IE and Firefox, and should work fine in other browsers as well.
The problem itself does not actually lie within the text() method, but instead is caused by this statement within the primary jQuery function body:// Handle HTML stringsvar m = /^[^]*(.+)[^]*$/.exec(a);
As such, any time $(this) is called within the each function body the error is thrown, not just when specific methods such as text() or parent() are called. The error seems to be caused by 'a' being an object instead of a string and IE barfing when trying to execute the regular _expression_ on 'a'.
The fix is quite simple, as far as I can tell... simply replace the line in question with this:// Handle HTML stringsvar m;if (typeof a == string) m = /^[^]*(.+)[^]*$/.exec(a);
Because the regular _expression_ should only be effective when it's executed on a string anyway, this prevents the IE error from being thrown and still preserves the functionality otherwise. In my limited testing so far, I have yet to find any other side effects to this.
Replacing the statement above fixes the text() and parent() functions, however the attr() function still requires some prodding to make it work correctly in an XML context within IE. The troublesome lines within the attr: declaration are (~line 706):
} else if ( elem.getAttribute != undefined ) { if ( value != undefined ) elem.setAttribute( name, value ); return elem.getAttribute( name, 2 );For whatever reason, IE throws an error when checking whether 
elem.getAttribute is defined, complaining about an invalid parameter list (despite the fact that it's just a check for existence). When typeof elem.getAttribute is called in IE, the type is reported as unknown, which certainly doesn't help things. IE also doesn't like the function call to 
elem.getAttribute with two parameters, so the return statement would have to be changed too. The fix once again is relatively simple. Before the block above, add another similar block that looks like this:} else if ( 
jQuery.browser.msie  elem.getAttribute(name) != undefined ) { if ( value != undefined ) elem.setAttribute( name, value ); return elem.getAttribute( name );This makes attr() work in both IE and Firefox, although I haven't tested in other browsers as of yet.
One last XML related fix I've found within jQuery. When using Xpath expressions, jQuery has a custom _expression_ which allows matching against the content of an element, such as $(p:contains('test')), which will match all p tags which contain text in their body. Once again, IE has trouble with this when processing it in an XML context. The fix is simple, change this line (~line 520):
contains: (a.innerText||a.innerHTML).indexOf(m[3])=0,to this:contains: ((a.firstChild  a.firstChild.nodeValue)||a.innerText||a.innerHTML).indexOf(m[3])=0,
And it works as expected in Firefox and IE (and, once again, presumably in other browsers too).I hope these fixes are as much a lifesaver for others as they are for me--most of what I'm doing in jQuery is based on processing XML, and not having the ability to use jQuery functionality within each loops was proving a major pain. I'm not familiar enough yet with SVN or the jQuery checkin process to check these changes into SVN myself--if it's better for me to check them in than for someone more familiar with the process, let me know and I'll work on that tonight.
Any testing in browsers other than IE or Firefox would also be appreciated--the modifications shouldn't really affect any browser other than IE, but I'm not yet familiar enough with _javascript_ to say that with any degree of certainty.
Cheers,~Peter Woods

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


Re: [jQuery] animate problem

2006-10-10 Thread Brandon Aaron
Thanks Jörn! I finally took some time to play around with the test
suite... good job!

This is now fixed in SVN.

--
Brandon Aaron

On 10/10/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Brandon Aaron schrieb:
  If someone can send me a test case I'd be more than happy to commit this to 
  SVN.
 
 Just add something like this to animate:
 @test stop();
 var hash = {opacity: 'hide'};
 var hashCopy = $.extend({}, hash);
 $('#foo').animate(hash, 'fast', function() {
   ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the
 hash parameter' );
   start();
 });

 Using stop() and start() like that is necessary to test the asynchronous
 code. I'm not sure wheather that comparision suffices. Just run it
 against the current code to see if it fails.

 -- Jörn

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


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


Re: [jQuery] Load problem

2006-10-10 Thread Karl Swedberg
On Oct 10, 2006, at 1:41 PM, Karl Swedberg wrote:When I put "jQueryGlobalFunctions();" into FireBug, I got "False." I'm guessing that your "return false" inside toggle() is in the wrong place. Try putting it right after $("img.handle").src("images/barHandleup.gif"); and $("img.handle").src("images/barHandledown.gif");and remove it from where it is two lines below $("img.handle").src("images/barHandledown.gif");sorry, Glen. I think I was looking at the wrong page (the first, not the second, http://glenlipka.kokopop.com/jQuery/slideMenu/slideMenu.htm). Nevertheless, when I tried using your code to prepend the header and then .load() without the callbacks, it worked -- in Firebug. Maybe you could troubleshoot by taking the callbacks out of .load(). Then put the second one in there (the function() with toggle() ) and see if that works. If it does, then put that parameter back in ( {test: true}, ).By the way, not sure if it's necessary to have "return false" in your $(document).ready() ?My apologies if this is all painfully obvious stuff.Cheers,Karl___Karl Swedbergwww.englishrules.comwww.learningjquery.com___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Queueing of effects (fx)

2006-10-10 Thread Brandon Aaron
On 10/10/06, Rexbard [EMAIL PROTECTED] wrote:

 Is this only true if the effects are specified on one line? In other words,
 would the following also queue?

 $(#foo).slideDown('slow');
 $(#foo).slideUp('slow');

The queue is element based. If they are on the same element, then yes
they are queued.


 The reason I ask is that there are some cases I've seen where rapid effects
 on elements go screwy. A good example of this is to rapidly select different
 tabs on the excellent $.tabs plugin http://www.stilbuero.de/jquery/tabs/.
 If you try this, make sure you use the tabs that trasition with effects
 (e.g. Slide Effect tabs 7-9)


Not having looked at the source for the tabs, I would assume the
effects are on different elements and are not queued. A custom queue
solution would have to be implemented in this case.

--
Brandon Aaron

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


Re: [jQuery] Performance question

2006-10-10 Thread Christof Donat
Hi,

  Well, you might whant to work with an element only if it is inside
  another one, which you already have:

 Unfortnuately, getElementById exists only for the document object,
 therefore you can't just say context.getElementById(...). I think this
 is the reason why jQuery can't help you there.

I know.

JQuery could check if context.getElementById exists and if it doesn't walk the 
elements in the context and return the first Element it finds that has the 
given ID:

if( context.getElementsById ) elems = [context.getElementsById(id)];
else {
var f = function(i,c) {
if( c.id == i ) return [c];
for( ch in c.childNodes ) {
if( ch.nodeType != 1 ) continue;
var r = f(i.ch);
if( r.length  0 ) return r;
}
return [];
}
elems = f(id,context);
}

That means that for browsers with a good implementation of getElementById() 
$('#myid',context) is much slower than $('#myid'), but it returns the 
expected result. At least that should not be slower than 
$('.myclass',context).

Christof

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


Re: [jQuery] Performance question

2006-10-10 Thread Brandon Aaron
IDs are supposed to be unique per the spec. jQuery shouldn't have to
hack/deal with invalid markup.

--
Brandon Aaron

On 10/10/06, Christof Donat [EMAIL PROTECTED] wrote:
 Hi,

   Well, you might whant to work with an element only if it is inside
   another one, which you already have:
 
  Unfortnuately, getElementById exists only for the document object,
  therefore you can't just say context.getElementById(...). I think this
  is the reason why jQuery can't help you there.

 I know.

 JQuery could check if context.getElementById exists and if it doesn't walk the
 elements in the context and return the first Element it finds that has the
 given ID:

 if( context.getElementsById ) elems = [context.getElementsById(id)];
 else {
 var f = function(i,c) {
 if( c.id == i ) return [c];
 for( ch in c.childNodes ) {
 if( ch.nodeType != 1 ) continue;
 var r = f(i.ch);
 if( r.length  0 ) return r;
 }
 return [];
 }
 elems = f(id,context);
 }

 That means that for browsers with a good implementation of getElementById()
 $('#myid',context) is much slower than $('#myid'), but it returns the
 expected result. At least that should not be slower than
 $('.myclass',context).

 Christof

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


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


Re: [jQuery] Interface Elements Autocomplete no longer available in Interface lib download...

2006-10-10 Thread Stefan Petre
Jörn Zaefferer wrote:
 Hi Stefan!
   
 OT: This changes in jQuery have impact in 3 major projects in my 
 company. I'm one step away to switch to YUI.
   
 
 Could you explain what changes exactly were the problem? The goal of the 
 1.0.2 release was to provide bug fixes without changing the API and 
 therefore not breaking code.
 My guess: As you have a lot of experience with the jQuery internals, 
 your code broke because you relied heavily on those internals. In this 
 case, it would be, too, important to know what changes broke your code.

 -- Jörn

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

   

your guess is not even close. If it was about the 'internals' then you 
would not hear about it because is my job to fix it.

If you take a look in the code you will see

jQuery.ajax(
{
success: function(response)
{
xml = $.httpData(response);
 ...
   }
}
 )
I had to use '$.httpData' so I can work with $('nodename', xml). Before 
version 1.0.1 I never needed to use it. Now in version 1.0.2 the 
'$.httpData' is useless.
Try to imagine how this impacts a real application, with thousands lines 
of code.


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


Re: [jQuery] animate problem

2006-10-10 Thread Jörn Zaefferer
Brandon Aaron schrieb:
 Thanks Jörn! I finally took some time to play around with the test
 suite... good job!

 This is now fixed in SVN.
   
Cool.

Is there a reason for not adding the test, too? The one big reason I put 
so much time into the test suite: By adding a test for every bug that 
occurs (before fixing it), odds are good that you notice them when they 
reoccur.

-- Jörn

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


Re: [jQuery] Load problem

2006-10-10 Thread Glen Lipka
It's not obvious. I'm not that good. :) I need the fundamentals.So I tried putting return false after the img lines as you suggested, but that didn't change it.I also pulled it out completely and that had no change either.
If I get rid of the call back I end up with: $(body).prepend(div id='IntuitHeader'/div);
 $(#IntuitHeader).load(IntuitProducts.htm);This loads properly, but no toggle.However, when I do this:
 $(body).prepend(div id='IntuitHeader'/div); $(#IntuitHeader).load(
IntuitProducts.htm,  {test: true},
  function()   { 
alert('test');  }
 );In that case, the html from intuitHeader doesnt appear. However, the alert does fire.Am I using the callback feature incorrectly? The reason I am using it is because I want to bind the toggle function after the html loads.
GlenOn 10/10/06, Karl Swedberg [EMAIL PROTECTED] wrote:
On Oct 10, 2006, at 1:41 PM, Karl Swedberg wrote:
When I put jQueryGlobalFunctions(); into FireBug, I got False.I'm guessing that your return false inside toggle() is in the wrong place. Try putting it right after
$(img.handle).src(images/barHandleup.gif);and$(img.handle).src(images/barHandledown.gif);





and remove it from where it is two lines below$(img.handle).src(images/barHandledown.gif);
sorry, Glen. I think I was looking at the wrong page (the first, not the second, 
http://glenlipka.kokopop.com/jQuery/slideMenu/slideMenu.htm).Nevertheless, when I tried using your code to prepend the header and then .load() without the callbacks, it worked -- in Firebug.
Maybe you could troubleshoot by taking the callbacks out of .load(). Then put the second one in there (the function() with toggle() ) and see if that works. If it does, then put that parameter back in ({test: true}, ).
By the way, not sure if it's necessary to have return false in your $(document).ready() ?My apologies if this is all painfully obvious stuff.
Cheers,Karl___Karl Swedberg
www.englishrules.comwww.learningjquery.com
___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Performance question

2006-10-10 Thread Christof Donat
Hi,

 IDs are supposed to be unique per the spec. jQuery shouldn't have to
 hack/deal with invalid markup.

jQuery has a context-parameter:

div id=IamAllreadyKnowndiv id=42asdf/div/div

$('#42',known) - should find one element

div id=IamAllreadyKnown/divdiv id=42asdf/div

$('#42',known) - should find no elements but currently does find one

Christof

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


Re: [jQuery] Performance question

2006-10-10 Thread Jörn Zaefferer
Brandon Aaron schrieb:
 IDs are supposed to be unique per the spec. jQuery shouldn't have to
 hack/deal with invalid markup.
   
The idea does not rely on invalid markup, but rather on a dynamic 
structure involving IDs: By searching for IDs within a context, you can 
apply stuff to them only when they are e.g. a child of a certain element.
But as it is quite easy to solve this without IDs, we shouldn't bother 
with a flawed workaround.

-- Jörn

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


Re: [jQuery] Load problem

2006-10-10 Thread Glen Lipka
Ok, I took out {test: true}, and now it works.What is the thing for? It's in the API, but the AJAXModule Wiki page did not have it.Maybe someone should check the API detail for Load and see if the specifics are not valid anymore?
GlenOn 10/10/06, Glen Lipka [EMAIL PROTECTED] wrote:
It's not obvious. I'm not that good. :) I need the fundamentals.So I tried putting return false after the img lines as you suggested, but that didn't change it.I also pulled it out completely and that had no change either.
If I get rid of the call back I end up with: $(body).prepend(div id='IntuitHeader'/div);

 $(#IntuitHeader).load(IntuitProducts.htm);This loads properly, but no toggle.However, when I do this:

 $(body).prepend(div id='IntuitHeader'/div); $(#IntuitHeader).load(
IntuitProducts.htm,  {test: true},

  function()   { 

alert('test');  }

 );In that case, the html from intuitHeader doesnt appear. However, the alert does fire.Am I using the callback feature incorrectly? The reason I am using it is because I want to bind the toggle function after the html loads.
GlenOn 10/10/06, Karl Swedberg 
[EMAIL PROTECTED] wrote:

On Oct 10, 2006, at 1:41 PM, Karl Swedberg wrote:

When I put jQueryGlobalFunctions(); into FireBug, I got False.I'm guessing that your return false inside toggle() is in the wrong place. Try putting it right after
$(img.handle).src(images/barHandleup.gif);and$(img.handle).src(images/barHandledown.gif);











and remove it from where it is two lines below$(img.handle).src(images/barHandledown.gif);

sorry, Glen. I think I was looking at the wrong page (the first, not the second, 

http://glenlipka.kokopop.com/jQuery/slideMenu/slideMenu.htm).Nevertheless, when I tried using your code to prepend the header and then .load() without the callbacks, it worked -- in Firebug.

Maybe you could troubleshoot by taking the callbacks out of .load(). Then put the second one in there (the function() with toggle() ) and see if that works. If it does, then put that parameter back in ({test: true}, ).
By the way, not sure if it's necessary to have return false in your $(document).ready() ?My apologies if this is all painfully obvious stuff.

Cheers,Karl___Karl Swedberg

www.englishrules.comwww.learningjquery.com

___jQuery mailing listdiscuss@jquery.com

http://jquery.com/discuss/


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


Re: [jQuery] ajax bug or I am really confused?

2006-10-10 Thread Ⓙⓐⓚⓔ
Great work.. I've not filed bugs or attempted to patch via svn.. so,
if you would, it would be a service to the community.

My original reason for poking in that area is my really really want xml patch:

// Make sure we get the dom parsed.
if ( xml.overrideMimeType  dataType == xml)
xml.overrideMimeType('text/xml');

All this does is override potential text/html to text/xml (thus giving
us pre-parsed goodness) when we explicitly ask for xml.

I guess I could figure out how to file a bug, I mean.. it's just bugzilla!

THANKS!

On 10/10/06, Ian Struble [EMAIL PROTECTED] wrote:
 This fix is no longer needed.  I tracked down the reason for why we
 have this work around and you are correct that it is because there is
 a work around for a firefox bug in Prototype.  We lost the comment
 referencing it in the 89 - 93 checkin of src\ajax.js.

 Here is the FF bug that this code is working around:
   https://bugzilla.mozilla.org/show_bug.cgi?id=246651

 The workarounds in both Prototype and jQuery have spawned quite a few
 FF bugs that have been marked as duplicate.  This FF bug even mentions
 the bug filed with Prototype to fix or update the work around to only
 fire for pre-1.5 FF browsers:
   https://bugzilla.mozilla.org/show_bug.cgi?id=331210

 Here is the Prototype bug to remove or update the work around to only
 target pre-1.5 FF browsers:
   http://dev.rubyonrails.org/ticket/5809

 Should I file a jQuery bug to fix it?  Here is a patch for my current
 work around.  Not very pretty but it works for me.

 Ian

 Index: ajax.js
 ===
 --- ajax.js (revision 413)
 +++ ajax.js (working copy)
 @@ -652,8 +652,12 @@
 xml.setRequestHeader(X-Requested-With, XMLHttpRequest);

 // Make sure the browser sends the right content length
 -   if ( xml.overrideMimeType )
 +   if ( xml.overrideMimeType  jQuery.browser.mozilla ) {
 +   // bug fixed in rev 1.5 - bug #246651
 +   var rev = navigator.userAgent.match(/rv:(\d+(?:\.\d+)+)/);
 +   if ( rev  rev  1.5 )
 xml.setRequestHeader(Connection, close);
 +   }

 // Wait for a response to come back
 var onreadystatechange = function(istimeout){



 On 9/28/06, Klaus Hartl [EMAIL PROTECTED] wrote:
 
 
  Ⓙⓐⓚⓔ schrieb:
   line 1691 of latest jquery   * $Rev: 249 $
  
  
 // Make sure the browser sends the right content length
 if ( xml.overrideMimeType )
   xml.setRequestHeader(Connection, close);
  
  
   should probably read:
  
 xml.overrideMimeType('text/xml');
  
   At least that is how I want it. Overriding html mime type lets files
   served as 'html' to be used in $('body',xml) type expressions.
  
  
 
 
  These lines seem to be ok, they are supposed to fix this bug:
 
  https://bugzilla.mozilla.org/show_bug.cgi?query_format=specificorder=relevance+descbug_status=__open__id=246651
 
 
  Prototype has this fix as well:
  http://dev.rubyonrails.org/ticket/3564
 
 
  -- Klaus
 
  ___
  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] Performance question

2006-10-10 Thread Christof Donat
Hi,

 But as it is quite easy to solve this without IDs, we shouldn't bother
 with a flawed workaround.

I have not yet been in a situation where I would have needed that, but it is a 
question of least surprise. In case I would use a construct like 
$('#myid',context), I would be very surprised to get an Element that is not 
in my current context.

As I have shown, a solution does not need much code and doesn't make anything 
else noticably slower. I guess that with the existing infrastructure in 
jQuery the code would even be shorter.

Christof

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


Re: [jQuery] Interface Elements Autocomplete no longer available in Interface lib download...

2006-10-10 Thread Jörn Zaefferer
Hi Stefan!

 your guess is not even close. If it was about the 'internals' then you 
 would not hear about it because is my job to fix it.
   
Ok, sorry.
 If you take a look in the code you will see

 jQuery.ajax(
 {
 success: function(response)
 {
 xml = $.httpData(response);
  ...
}
 }
  )
 I had to use '$.httpData' so I can work with $('nodename', xml). Before 
 version 1.0.1 I never needed to use it. Now in version 1.0.2 the 
 '$.httpData' is useless.
 Try to imagine how this impacts a real application, with thousands lines 
 of code.
   
Oh right, that is really ugly. That was quite a heavy API change. 
According to the revision history, John added the call to $.httpData 
with revision 278, I have no idea why that was necessary...

-- Jörn

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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Sean O

Hi Jörn,


Jörn Zaefferer wrote:
 
 What I like about it:
 It works on Opera 8.54  9.02 and IE7RC1, too.
 Clean and structured code, good examples provided. There were some 
 updates to the Plugins/Authoring guide which you may want to include.
 

Thanks for the browser tests.  I'm sure Safari will crap out. (will test
tonight at home)



 What I don't like:
 You extracted the playerpath, but not the name of the player object 
 itself: Would be nice to have that extracted into the playerpath.
 The code to create the object element is quite clumsy. For performance 
 reasons, you should use an array with join(). For code readability, 
 something else is necessary, but I haven't a good solution for this at
 hand.
 It is not unobtrusive: I don't get anything useful without JS, though no 
 JS is necessary for the flash object. It's true that the object code is 
 quite clumsy, but this should be handled by a plugin or template on the 
 server-side. This point makes your plugin pretty useless on sites, that 
 don't strictly require JS. In that case, your plugin is nice, because 
 you don't have to implement the plugin for every server-side scripting 
 language available...
 

Whew!  Good thing I said 'be gentle!'  LOL

Just kidding.  I appreciate the time taken to look over my work.  This is my
first attempt at a plugin.  I'm primarily a server-side guy.  I only did it
out of my sheer excitement for jQuery, and the desire to give a little back. 
I think I saw an array join-vs.-concatenate JS performance article before...
I'll probably do that first.

I've removed the unobtrusive feature line... Unobtrusive != Doesn't Work
haha.  I'm not sure I get what you're saying about the object
element/code... I just did a quickie concatenation, which I knew was not
optimal.  I'll read up more on that for my next plugin ;)


Thanks,


SEAN O
-- 
View this message in context: 
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6742878
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] IE7 May be Pushed out Tomorrow

2006-10-10 Thread Onno Timmerman
Webunity|Gilles van den Hoven schreef:
 Rey Bango wrote:
 If you don't want to upgrade, be very vigilant about what automatic 
 updates you install during MS' normal patch cycle:
   
 Does anybody know if it is possible to run both IE 6.x and IE7 both on 
 thesame system? An absolute must if you are a web developer...
 
 Thanx
 
 Gilles
 

I use GNU/Linux ubuntu for that. I got simple IE 6 and IE 5.5 open. And 
hopefully soon IE 7 together... If that doesn't work I also open windows 
via vmware.

Two monitors... Upper monitor a browser down monitor text editor.
It's easy. On each desk I have a diffrent browser Firefox, IE, opera, 
Konquerer ...
and all the same on the bottom screen.

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


Re: [jQuery] animate problem

2006-10-10 Thread Brandon Aaron
To true ... wouldn't want to see it pop back up. I'll add it in.

--
Brandon Aaron

On 10/10/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Brandon Aaron schrieb:
  Thanks Jörn! I finally took some time to play around with the test
  suite... good job!
 
  This is now fixed in SVN.
 
 Cool.

 Is there a reason for not adding the test, too? The one big reason I put
 so much time into the test suite: By adding a test for every bug that
 occurs (before fixing it), odds are good that you notice them when they
 reoccur.

 -- Jörn

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


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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Yehuda Katz
Can I see the FLA file?-- YehudaOn 10/10/06, Sean O [EMAIL PROTECTED] wrote:
Hi,I've created a new jQuery plugin, jMP3, to easily make MP3s playabledirectly on most any web site.Information, demos and code:http://www.sean-o.com/jquery/jmp3/
Let me know what you think.It's my first plugin, so be gentle!SEAN O--View this message in context: http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6737375
Sent from the JQuery mailing list archive at Nabble.com.___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/-- Yehuda KatzWeb Developer | Wycats Designs(ph)718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] load + tickbox + document(ready) ???

2006-10-10 Thread Onno Timmerman
Onno Timmerman schreef:
 I got a easy problem if you know how to implement it.
 
 I call some info with the AHAH load function. In this info it should be 
 possible to call TickBox. However my problem is that TickBox won't work. 
 My guess is, because the DOM travesing needs to rerun when AHAH loads a 
 piece of information on the page. Is this assumption correct and most 
 important how do I solve it? So that the clicked content will load in a 
 tickbox?
 
 thx
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

Found it... Thanxs to help on Freenode IRC #jquery ...

Just reload the this in the page
$(document).ready(TB_init);

thx

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


[jQuery] Migrating from Flash + AMFPHP to jQuery + ???PHP

2006-10-10 Thread Your Name
Hi everyone!

i'm new to the ajaxian world so after reading a lot about several
javascript frameworks and libraries, i decided to begin with jQuery
because it rocks!.

What i need now is to know the best way to build the server side (with
PHP), maybe something like AMFPHP (because it rocks too!).

Please, visit http//www.comaexperimental.com/jquery, there you'll find
my very first ajax attempt.

saludos desde Venezuela!!!

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


Re: [jQuery] New Plugin: jMP3

2006-10-10 Thread Sean O

Yehuda,

I believe the FLA source file is available in the player download:
http://jeroenwijering.com/upload/flash_single_mp3_player.zip

The author also has a player for multiple files/playlists:
http://jeroenwijering.com/?item=Flash_MP3_Player

Looks like he includes the source for this as well.

___
SEAN O



wycats wrote:
 
 Can I see the FLA file?
 
 -- Yehuda
 
-- 
View this message in context: 
http://www.nabble.com/New-Plugin%3A-jMP3-tf2416968.html#a6743801
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Attach a Style Sheet

2006-10-10 Thread Steve Ivy
Glen,

I use a couple methods:

1) Add an empty LINK and the set the href in the script:

$('#mylinkid').attr('href', stylesheetpath);

2) probably better but a little longer:

$('head').append('link id=mylinkid href=stylesheetpath
rel=stylesheet')

I'm sure someone will chime in here and tell me I'm an idiot, at which
point I'll go fix my own code... :-)

--Steve

[EMAIL PROTECTED] | irc: monkinetic|redmonk



  Original Message 
 Subject: [jQuery] Attach a Style Sheet
 From: Glen Lipka [EMAIL PROTECTED]
 Date: Tue, October 10, 2006 11:44 am
 To: jQuery Discussion. discuss@jquery.com
 
 Is there a simple way to attach a style sheet to the page in jQuery?
 
 Thanks,
 
 Glen
  
 -
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 


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


Re: [jQuery] Interface Elements Autocomplete no longer available in Interface lib download...

2006-10-10 Thread Klaus Hartl


Jörn Zaefferer schrieb:
 Hi Stefan!
 your guess is not even close. If it was about the 'internals' then you 
 would not hear about it because is my job to fix it.
   
 Ok, sorry.
 If you take a look in the code you will see

 jQuery.ajax(
 {
 success: function(response)
 {
 xml = $.httpData(response);
  ...
}
 }
  )
 I had to use '$.httpData' so I can work with $('nodename', xml). Before 
 version 1.0.1 I never needed to use it. Now in version 1.0.2 the 
 '$.httpData' is useless.
 Try to imagine how this impacts a real application, with thousands lines 
 of code.
   
 Oh right, that is really ugly. That was quite a heavy API change. 
 According to the revision history, John added the call to $.httpData 
 with revision 278, I have no idea why that was necessary...

That was kind of my fault I guess. John and I agreed, after I reported 
that to the list, that it's absolutely not intuitive to have the XHR 
object instead of the loaded data passed to the success callback. 
Besides that it was described in the docs like that anyway.

So there was the decision to fix that according to the docs or change 
the docs. I think everybody agrees on that it's much more useful to have 
the data in the success callback than the XHR object which would have 
meant that everybody had to use the internal $.httpData function to get 
the data out.

I think, John pointed that change out quite obvious on the list.


-- Klaus

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


Re: [jQuery] Fix for IE XML nested each issues (Bug #164)

2006-10-10 Thread Klaus Hartl


Peter Woods schrieb:
 The current version of jQuery has trouble when trying to access methods 
 such as text() or parent() or attr() inside an each statement within the 
 context of an XML document. For a test case, see Bug #164 
 http://jquery.com/dev/bugs/bug/164/. The general assumption with this 
 bug has been that the problem lies in methods such as text(), and 
 therefore it would be impossible to determine whether the object in 
 question was an XML object or a HTML object and act on it accordingly. 
 While this bug has been closed, it is crucial for what I'm using jQuery 
 for, so I decided to debug it and have found a simple yet (as far as I 
 can tell) effective solution to the bug which works in both IE and 
 Firefox, and should work fine in other browsers as well.
 
 The problem itself does not actually lie within the text() method, but 
 instead is caused by this statement within the primary jQuery function body:
 
 // Handle HTML strings
 var m = /^[^]*(.+)[^]*$/.exec(a);
 
 As such, any time $(this) is called within the each function body the 
 error is thrown, not just when specific methods such as text() or 
 parent() are called. The error seems to be caused by 'a' being an object 
 instead of a string and IE barfing when trying to execute the regular 
 expression on 'a'.
 
 The fix is quite simple, as far as I can tell... simply replace the line 
 in question with this:
 
 // Handle HTML strings
 var m;
 if (typeof a == string) m = /^[^]*(.+)[^]*$/.exec(a);
 
 Because the regular expression should only be effective when it's 
 executed on a string anyway, this prevents the IE error from being 
 thrown and still preserves the functionality otherwise. In my limited 
 testing so far, I have yet to find any other side effects to this.


Thank you Peter! I was also quite unhappy to see this bug closed as 
wontfix. I was bothered by the same bug.

Looks like it can be fixed finally... :-)



 One last XML related fix I've found within jQuery. When using Xpath 
 expressions, jQuery has a custom expression which allows matching 
 against the content of an element, such as $(p:contains('test')), 
 which will match all p tags which contain text in their body. Once 
 again, IE has trouble with this when processing it in an XML context. 
 The fix is simple, change this line (~line 520):
 
 contains: (a.innerText||a.innerHTML).indexOf(m[3])=0,
 
 to this:
 
 contains: ((a.firstChild  
 a.firstChild.nodeValue)||a.innerText||a.innerHTML).indexOf(m[3])=0,

Does this work in Firefox with text nodes that start on a new line?

item
 Text node
/item


-- Klaus





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


[jQuery] How to disable a form fields in jQuery

2006-10-10 Thread Eriksen Costa
Hello people,I was searching for a way to disable form in jQuery. I searched the API and dont found anything about the disabled attribute. How can I disable form fields in jQuery?I tried:$(textarea.news01
).id().disabled = true;- return the ID - html attributeSo, how can I manage this in jQuery?Thanks a lot,Eriksen Costawww.marinheirobrasil.com.br

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


Re: [jQuery] How to disable a form fields in jQuery

2006-10-10 Thread Glen Lipka
Try: $(textarea.news01).attr(disabled, true);GlenOn 10/10/06, Eriksen Costa 
[EMAIL PROTECTED] wrote:Hello people,I was searching for a way to disable form in jQuery. I searched the API and dont found anything about the disabled attribute. How can I disable form fields in jQuery?
I tried:$(textarea.news01
).id().disabled = true;- return the ID - html attributeSo, how can I manage this in jQuery?Thanks a lot,Eriksen Costa
www.marinheirobrasil.com.br


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


Re: [jQuery] Attach a Style Sheet

2006-10-10 Thread kenton.simpson

this may also help 

http://www.kelvinluck.com/article/switch-stylesheets-with-jquery

-- 
View this message in context: 
http://www.nabble.com/Attach-a-Style-Sheet-tf2418733.html#a6744899
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] How to disable a form fields in jQuery

2006-10-10 Thread Klaus Hartl
Sean O schrieb:
 Eriksen,
 
 Try:
 $(textarea.news01).attr(disabled, disabled);
 
 If you need to re-enable it later:
 $(textarea.news01).removeAttr(disabled);

This does not work as expected, see my test page here (with checkboxes):
http://stilbuero.de/demo/jquery/checkbox.html

If you use removeAttr the checkbox is not unchecked in Firefox. I assume 
it's the same with disabled (all boolean attributes).

With jQuery 1.02 the following works:

$(textarea.news01).attr(disabled, true); // disable
$(textarea.news01).attr(disabled, false); // enable

You have to keep in mind these boolean attributes... I wonder, if

$(textarea.news01).attr(disabled, disabled);

should be handled by jQuery like $(textarea.news01).attr(disabled, 
true) or if that is already done...?


-- Klaus



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


[jQuery] Appending option to select

2006-10-10 Thread Galen Palmer
Hi All,

I'm new to jquery but like what I see so far.

I have an array of strings that I'd like to add to a select element
as option elements.

HTML:

  select id=routeSelect
  /select

JavaScript:

for(var i = 0; i  routes.length; ++i) {
  $(#routeSelect).append(option value=\
  + routes[i] +\+ routes[i] +/option);
}

The above code appears to just append the text to the select element
without creating the child option elements.  Viewing the generated
source (in Web Developer in Firefox) shows htm like: select
id=routeSelectabcdef/select

However, the following code (more old school) seems to work fine.

var routeSelect = $(#routeSelect).get(0);
for(var i = 0; i  routes.length; ++i) {

  routeSelect.options[i + 1] = new Option(
  routes[i],
  routes[i]);
}

I'm using firefox under Mac OSX though it looks like the same behavior
under safari and opera.

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


Re: [jQuery] How to disable a form fields in jQuery

2006-10-10 Thread Klaus Hartl


Sean O schrieb:
 
 Klaus Hartl wrote:
 Sean O schrieb:
 Eriksen,

 Try:
 $(textarea.news01).attr(disabled, disabled);

 If you need to re-enable it later:
 $(textarea.news01).removeAttr(disabled);
 This does not work as expected, see my test page here (with checkboxes):
 http://stilbuero.de/demo/jquery/checkbox.html

 If you use removeAttr the checkbox is not unchecked in Firefox. I assume 
 it's the same with disabled (all boolean attributes).

 
 Klaus,
 
 You're right, this doesn't work for checkboxes.  But the example code given
 by the OP was for a textarea, so I used that as my test case (which works
 here in IE6  FF 1.5.0.7).  disabled=disabled seems weird, but reference
 w3schools:
 http://www.w3schools.com/tags/tag_textarea.asp

Hi Sean,

disabled=disabled is ok for me - I belong to the people who deliver 
their XHTML as real XML ;-)

Still you have to keep in mind that it is a boolean attribute and the 
DOM interface for enabling/disabling is to set a boolean value.

And I furthermore encourage you to not rely on w3schools instead of the 
real W3C specs.


-- Klaus

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


Re: [jQuery] Attach a Style Sheet

2006-10-10 Thread Jörn Zaefferer
kenton.simpson schrieb:
 sorry you said stylesheet, but you get the idea. 
 I haven't tested this yet, but it may work.

 jQuery(document.createElement(link))
   .attr({type: text/css,href: my.css,rel:stylesheet})
   .appendTo(head);
   
To make it even more jQuerish:

jQuery(link)
.attr({type: text/css,href: my.css,rel:stylesheet})
.appendTo(head);


 I dont think that works in IE because jQuery will wrap the link in a div
 element. Which is not allowed in the head. FF seems ok with it even thou its
 not correct. try this.
   
It's true that jQuery creates a div first to use it's innerHTML 
property, but that div is not inserted to the document.

-- Jörn

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


Re: [jQuery] Fix for IE XML nested each issues (Bug #164)

2006-10-10 Thread Jörn Zaefferer
Peter Woods schrieb:
 Seems to work for me in Firefox for a couple of test cases I made just
 now to test the new line functionality.

 I've also done a bit of testing in Safari just now, and the results
 are similar, namely everything's working fine with the changes applied
 to the latest SVN. I may work on compiling some formal test cases for
 this functionality tonight or tomorrow sometime.
   
Would be great if you could post those tests somewhere, so they can be 
added to the test suite.
John already reopended the bug report concerning the first issue...

-- Jörn

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


[jQuery] unhover and untoggle revisited

2006-10-10 Thread Brandon Aaron
I've found a solution to adding and removing *multiple* hover and
toggle events as well as removing them. It is a little cleaner than my
previous attempt at adding an unhover and untoggle as it plugs into
the main event system.

Here is a very simple example page:
http://brandonaaron.net/jquery/events/test.html
The diff is here: http://brandonaaron.net/jquery/events/event.js.diff

Please test if you can and let me know if you run into any issues. I
think this would be a good addition to the core to complete these two
really nice helper methods.

Any feedback is welcome! I'm off to update my mouswheel plugin to do the same.

--
Brandon Aaron

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


Re: [jQuery] Performance question

2006-10-10 Thread Jörn Zaefferer
Christof Donat schrieb:
 As I have shown, a solution does not need much code and doesn't make anything 
 else noticably slower. I guess that with the existing infrastructure in 
 jQuery the code would even be shorter.
   
Right, I got that wrong. Your modifications concern only the special 
case, therefore it should be no problem to add it.

I filed a bug report, please add anything that might be useful: 
http://jquery.com/dev/bugs/bug/267/

-- Jörn

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


Re: [jQuery] unhover and untoggle revisited

2006-10-10 Thread Brandon Aaron
As it shouldn't. The font colors are unhover and untoggle. :)

--
Brandon Aaron

On 10/10/06, Giuliano Marcangelo [EMAIL PROTECTED] wrote:
 Brandon,

 hover and toggle working fine, but font-color is not changing


 On 10/10/06, Brandon Aaron  [EMAIL PROTECTED] wrote:
 
  I've found a solution to adding and removing *multiple* hover and
  toggle events as well as removing them. It is a little cleaner than my
  previous attempt at adding an unhover and untoggle as it plugs into
  the main event system.
 
  Here is a very simple example page:
  http://brandonaaron.net/jquery/events/test.html
  The diff is here:
 http://brandonaaron.net/jquery/events/event.js.diff
 
  Please test if you can and let me know if you run into any issues. I
  think this would be a good addition to the core to complete these two
  really nice helper methods.
 
  Any feedback is welcome! I'm off to update my mouswheel plugin to do the
 same.
 
  --
  Brandon Aaron
 
  ___
  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/


[jQuery] Append body

2006-10-10 Thread sdkester

I tried appending the body with a div using the following in a js file:

$(body).append('div id=ajaxBusy class=ajaxBusyp ../../loading2.gif
nbsp;nbsp;/p/div');

It is not working. Maybe I'm going about it wrong. I simply want to insert
the above html anywhere in the body. Is my code wrong and/or am I approching
it from the wrong angle.

TIA,

Shaun Kester
-- 
View this message in context: 
http://www.nabble.com/Append-body-tf2419689.html#a6746057
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Appending option to select

2006-10-10 Thread Rey Bango
Patrick,

I tried using this plugin but it didn't seem to work with v1.0.1. Which 
version of JQuery are you using?

Rey

patrickk wrote:
 I´m using the plugin for DOM creation to accomplish that.
 see
 http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype
 
 patrick
 
 
 Am 10.10.2006 um 22:49 schrieb Galen Palmer:
 
 
Hi All,

I'm new to jquery but like what I see so far.

I have an array of strings that I'd like to add to a select element
as option elements.

HTML:

  select id=routeSelect
  /select

JavaScript:

for(var i = 0; i  routes.length; ++i) {
  $(#routeSelect).append(option value=\
  + routes[i] +\+ routes[i] +/option);
}

The above code appears to just append the text to the select element
without creating the child option elements.  Viewing the generated
source (in Web Developer in Firefox) shows htm like: select
id=routeSelectabcdef/select

However, the following code (more old school) seems to work fine.

var routeSelect = $(#routeSelect).get(0);
for(var i = 0; i  routes.length; ++i) {

  routeSelect.options[i + 1] = new Option(
  routes[i],
  routes[i]);
}

I'm using firefox under Mac OSX though it looks like the same behavior
under safari and opera.

___
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] Attach a Style Sheet

2006-10-10 Thread kenton.simpson

Thanks for the info. i did not realize that.
-- 
View this message in context: 
http://www.nabble.com/Attach-a-Style-Sheet-tf2418733.html#a6746281
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Load problem

2006-10-10 Thread Glen Lipka
This works perfect. Thank you.What is the difference between having the test and not having the test the way I wrote previously?GlenOn 10/10/06, 
Karl Swedberg [EMAIL PROTECTED] wrote:
On Oct 10, 2006, at 2:30 PM, Glen Lipka wrote:
It's not obvious. I'm not that good. :) I need the fundamentals.So I tried putting return false after the img lines as you suggested, but that didn't change it.I also pulled it out completely and that had no change either.
If I get rid of the call back I end up with: $(body).prepend(div id='IntuitHeader'/div);
 $(#IntuitHeader).load(IntuitProducts.htm);
This loads properly, but no toggle.However, when I do this: $(body).prepend(div id='IntuitHeader'/div);
 $(#IntuitHeader).load( IntuitProducts.htm,
  {test: true},
  function()   { 
alert('test');  }
 );In that case, the html from intuitHeader doesnt appear. However, the alert
doesfire.Am I using the callback feature incorrectly? The reason I am using it is because I want to bind the toggle function after the html loads.
GlenWell, I'm not that bright, so we're even. ;-)And since I couldn't explain well enough what I'd do to change things, I rebuilt your page on my server, minus a couple images:
http://test.learningjquery.com/slideMenu/slideMenu.htm
It's working here for me in IE and Firefox. Feel free to copy it all back to your server if you want.Cheers,Karl___
Karl Swedbergwww.englishrules.com
www.learningjquery.com
___jQuery mailing listdiscuss@jquery.com
http://jquery.com/discuss/
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Attach a Style Sheet

2006-10-10 Thread Brandon Aaron
On 10/10/06, Glen Lipka [EMAIL PROTECTED] wrote:
 I tried to make it
 jQuery(link)
 but that didn't seem to work (was looking in IE).  The other one with
 jQuery(document.createElement(link) did work.

 What is the difference between jQuery() and $().  Why should you use one
 over the other?

If you are writting a plugin or patch, then jQuery() should be used.
However, in your own scripts you are encouranged to use the
shorcut/alias $. This makes it easy to change the $ alias to something
else if needed.

--
Brandon Aaron

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


[jQuery] form plugin updates

2006-10-10 Thread Mike Alsup
Based on recent discussions I've made some updates to the form plugin.
 Today's discussion prompted some mods to the ajaxSubmit method.  I
also updated many of the comments and then discovered that the
coordinates for image submit elements are not posted correctly in all
browsers (FF in my case).  So I reworked ajaxForm() to use the
dimensions plugin (if it is installed).  If your page doesn't include
the dimensions plugin then the cross-browser support for image submit
elements is unreliable.

I've posted an updated form.js along with an updated test form here:
http://www.malsup.com/jquery/form/

It seems to work correctly in Opera, FF and IE (6  7).  I'd
appreciate it if anyone with access to other browsers could test it
out.

The plugin is now 1.70KB when packed. At some point it would be nice
to role the changes from the past few weeks back into SVN and
determine if it might be a core candidate at that point.

Mike

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


Re: [jQuery] form plugin updates

2006-10-10 Thread Renato Formato
Mike Alsup ha scritto:
 Based on recent discussions I've made some updates to the form plugin.

Thanks Mike,
I would like to remind that there is still a very annoying bug on IE.
Fil filled a bug report about that for jQuery 
(http://jquery.com/dev/bugs/bug/160/)

In short, if you have an input named action or method, this code

var url = url || f.action || '';
var mth = mth || f.method || 'GET';

will retrieve the input value and not the form attributes.
Some fixes are proposed in bug report.

Renato

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


Re: [jQuery] form plugin updates

2006-10-10 Thread Mike Alsup
Thanks for the heads-up, Renato.  I put your fix in there and posted
the updated js.  It worked fine with all the browsers I have.

Mike

 In short, if you have an input named action or method, this code

 var url = url || f.action || '';
 var mth = mth || f.method || 'GET';

 will retrieve the input value and not the form attributes.
 Some fixes are proposed in bug report.

 Renato

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


Re: [jQuery] form plugin updates

2006-10-10 Thread Matt Grimm
Nice work Mike. 

How should I go about deleting the FastSerialize wiki page I created on
jQuery.com now? A request to John I suppose?

m. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Alsup
Sent: Tuesday, October 10, 2006 3:10 PM
To: jQuery Discussion.
Subject: Re: [jQuery] form plugin updates

Thanks for the heads-up, Renato.  I put your fix in there and posted the
updated js.  It worked fine with all the browsers I have.

Mike

 In short, if you have an input named action or method, this code

 var url = url || f.action || '';
 var mth = mth || f.method || 'GET';

 will retrieve the input value and not the form attributes.
 Some fixes are proposed in bug report.

 Renato

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

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


Re: [jQuery] Queueing of effects (fx)

2006-10-10 Thread Abdur-Rahman Advany




Well, the scoping works fine now, you just need to define the same
scope(name) for all elements that share the same queue.

example:

$('#testa').click(function(){
 $('#testdiv1').scope('meta').slideDown();
 $('#testdiv2').scope('meta').slideDown();
});

Abdur-Rahman Advany wrote:

  
Well, I got the scoped effects to work...
  http://jquery.com/docs/Plugins/limitQueue/
(check the beta code below
the first one). However this doesn't work as I would like it (but works
as expected)
  
Abdur-Rahman Advany wrote:
  
I am trying to implement a scope (other then the element) where effects 
can be queued, however its not very easy (when trying to keep the same 
api and compatibility with interface enc...

Brandon Aaron wrote:
  

  On 10/10/06, Rexbard [EMAIL PROTECTED] wrote:
  

  
Is this only true if the effects are specified on one line? In other words,
would the following also queue?

$("#foo").slideDown('slow');
$("#foo").slideUp('slow');

  
  
  The queue is element based. If they are on the same element, then yes
they are queued.

  

  
The reason I ask is that there are some cases I've seen where rapid effects
on elements go screwy. A good example of this is to rapidly select different
tabs on the excellent $.tabs plugin http://www.stilbuero.de/jquery/tabs/.
If you try this, make sure you use the tabs that trasition with effects
(e.g. Slide Effect tabs 7-9)


  
  
  Not having looked at the source for the tabs, I would assume the
effects are on different elements and are not queued. A custom queue
solution would have to be implemented in this case.

--
Brandon Aaron

___
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/
  




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


[jQuery] I have a problem with XPATH on IE6 with ajax response jQuery 1.0.2

2006-10-10 Thread Stephen Woodbridge
OK, I am obviously missing something here. My code works on FF 1.0.5, 
Opera 8.5.4 and 9.0.2 but is throwing an error in IE6. I have located 
the line generating the error (no thanks to the IE error message line 
that is really bogus):

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

just double click on the map, and it generates an Ajax call. The xml is 
loaded in the textarea under the map, which works fine. I then have a 
schema hash the I loop thru and extract various items from the xml and 
put them into html tables and stuff them into $(#rgeo2).html(str);

The problem is occurring when I try to access the xml using xpath like:

imaptools-demo.js:233

var description = $(//[EMAIL PROTECTED]'+feature+']/description, 
xml).text();

This is the first xpath and it is generating the error. Like I said this 
works fine in other browsers on is a problem in IE6 (have not tested it 
in IE7, probably has problems in IE 5.5).

Am I using this wrong?
Looking at the jQuery cheat sheet, I don't see .text() did that get 
deprecated? what should I be using in that case? .val()? Nope val() 
doesn't work.

Any help would be greatly appreciated.

-Steve

This is kind of like chess ... it is easy to play, but takes some 
thought and training to master!

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


  1   2   >