Re: [jQuery] Why is Opera so slow (especially for thickbox) ?

2006-08-18 Thread Johan Sundström
 My function creates only one interval for one animation and sets
 properties in loop avery frame:

Nice. I wish more libraries would do this; I believe YUI suffers from
the same problem, for instance. It is of course a bit difficult with
animations that are not necessarily in sync, but I presume your
solution applies to a slightly less open ended use case than typical
generic animate methods.

-- 
 / Johan Sundström, http://ecmanaut.blogspot.com/

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


[jQuery] ToggleClass and parents();

2006-08-18 Thread Andrew Buzzell

With a checkbox inside of a label, I was trying to toggle a class on the 
label based on whether the input was checked or not. I tried every 
permutation of:

$(.checkbox).change(function(){
$(this).parent().toggleClass('selected');
});

label for=testinput id=test type=checkbox class=checkbox 
/Test/label

Tried both the dev and the current jquery. Any idea what I'm doing wrong?






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


Re: [jQuery] Extraneous whitespace in jquery-svn.js

2006-08-18 Thread John Resig
 Purely cosmetic, but has anyone noticed that there is extra whitespace
 in the generated jquery-svn file
 (http://jquery.com/src/jquery-svn.js).

Yeah - jquery-svn.js is currently being generated from jquery.lite.js
(in SVN) - however I haven't yet pruned out the extra endline
characters. This is a simple fix that I'll get to soon.

--John

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


Re: [jQuery] Rebind events on dynamic content (modified DOM)

2006-08-18 Thread John Resig
Tom - the following should do the trick:

$(#days).load(
   ajax/weekview_appointments.aspx?fromdate= + calendarDay.Date,
   BindTimeSelectors
);

Calling BindTimeSelectors() was executing it too early, and there's no
need for an extra wrapper function - since it is a function to begin
with. Hope that helps.

--John

On 8/18/06, Tom Holder [EMAIL PROTECTED] wrote:
 I tried that and it didn't work until I added function(){} around the
 BindTimeSelectors function eg.

 $(#days).load(
 ajax/weekview_appointments.aspx?fromdate= + calendarDay.Date,
 function(){BindTimeSelectors;}
 );

 On 8/17/06, Klaus Hartl [EMAIL PROTECTED] wrote:
 
 
  Michael Geary schrieb:
   You are calling BindTimeSelectors before the AJAX load is complete.
  
   Which AJAX load is the one that BindTimeSelectors depends on? Assuming it 
   is
   the second one, you could code it like this:
  
$(#daysheader).load( ajax/weekview_headers.aspx?fromdate= +
   calendarDay.Date );
$(#days).load(
ajax/weekview_appointments.aspx?fromdate= + calendarDay.Date,
BindTimeSelectors()
);
 
  I think it should read:
 
  $(#days).load(
   ajax/weekview_appointments.aspx?fromdate= + calendarDay.Date,
   BindTimeSelectors
  );
 
 
  -- Klaus
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 

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



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

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


Re: [jQuery] Any IE6 related input element changes recently?

2006-08-18 Thread John Resig
 and be replaced
 by calls for updated documentation. :-)

Already done :-) (Temporary URL)
http://john.jquery.com/jquery/docs/

--John

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


Re: [jQuery] Any IE6 related input element changes recently?

2006-08-18 Thread Dave Methvin
That is a good reference. Is there a getting-started-style guide somewhere?
Also, has anyone worked on how-do-I style FAQs or equivalent functions
between standard DOM or other frameworks? If not I can work on some of that.

It might be useful to have the built-in documentation specify categories for
the functions to make some sort of automatic cross-reference easier. So for
example .addClass() might have @keywords class, className. I haven't
totally thought through how that would be used.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of John Resig
Sent: Friday, August 18, 2006 5:13 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Any IE6 related input element changes recently?

 and be replaced
 by calls for updated documentation. :-)

Already done :-) (Temporary URL)
http://john.jquery.com/jquery/docs/

--John

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


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


[jQuery] Live Grid feature requests

2006-08-18 Thread Menier, Todd








To
makoomba:

Saw
your Live Grid and love it (http://makoomba.altervista.org/grid/).
Any new features forthcoming? Specifically, I was comparing it to the Rico
LiveGrid (http://openrico.org/rico/livegrid.page)
and would love to have the following features:



1) Column
sorting. I know this is a little harder than it sounds. Can't use something
like the TableSorter plugin because not all data is present on the client
(that's the whole point), so it would presumably require an Ajax call and sort it on the server.



2)
The Rico grid gets a total row count ahead of time and pre-builds empty rows.
Then it just populates them on demand. This makes for a much cleaner scrolling effect
in my opinion  I would encourage you to compare.



Unless
makoomba (or someone else) has plans to add these features, I might take a
crack at it myself. If I do, I will of course share with the group.



Of
course, to only point out the shortcomings of the jQuery grid isn't fair. It
beats the Rico grid on at least 2 fronts:



1)
Adjustable column widths  awesome!



2) Overall
easier to implement. For example, the Rico grid doesn't actually fix the header
row for you. In the example, the header row is implemented as a separate table with
the column widths hard-coded to be the same as the data table. In the jQuery
version, you use a thead and the rest is taken care of for you 
much cleaner. Again, well done!



Also,
the fact that grid.js weighs in at a mere 5k uncompressed is yet another testament
to jQuery's magic.



Todd








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


Re: [jQuery] Possible Safari bug with :hidden property

2006-08-18 Thread John Resig
The problem is that Safari doesn't properly report the current style
property values. This may be possible in the Safari Nightlies, but I
haven't tested yet. This is a major fallback of Safari, unfortunately.

--John

On 8/18/06, Samuel Souder [EMAIL PROTECTED] wrote:
 I am running up against an issue I see in Safari.

 Lets say I have a div with some content in it assigned a class of
 'myClassName'. I then tell that class to be 'display: none;' in the
 CSS. Now for the odd part... When I ask $(.myClassName:hidden).show
 (); it doesn't show up!?

 So I made a test page up that checks $(.myClassName).is(:hidden)
 and what do you know, Safari says that it's visible not hidden!

 Am I doing something wrong here?

 NOTE: I have tried the same code on http://jquery.com/src/latest/
 sane/, http://jquery.com/src/beta/sane/, and http://jquery.com/src/
 dev/sane/ codebases.


 Thanks for your help!
 Sam

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



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

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


[jQuery] $(window).height() / .width()

2006-08-18 Thread Dave Cardwell
$(window).height() and .width() cause the error e.style has no properties.

I think it would be preferable to modify .height and .width to handle 
window objects as a special case.

A quick Google suggests using window.innerWidth, or where that is 
undefined document.body.offsetWidth.

I just tested $('html').width() in Firefox 1.5.0.6 and IE6 and it 
returns the width of the window even when $('body').width() is 
explicitly set as lower.  Therefore, I believe $('html').width() would 
be preferable to document.body.offsetWidth.


Any chance of this being implemented?  I'd like to use $(window).width() 
and .height() in an update to my jQMinMax plugin.


Best wishes,
Dave Cardwell ~ http://davecardwell.co.uk/

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


Re: [jQuery] Possible Safari bug with :hidden property

2006-08-18 Thread Samuel Souder
Thanks for the quick followup John. I also run the WebKit nightlies and is is still broken as of today. Is there something I should be submitting to WebKit's bug reports? Lastly, do you know of any good ways around this? :hidden is a very cool selector and has a lot of great uses so I would obviously love to use it. SamOn Aug 18, 2006, at 7:32 PM, John Resig wrote:The problem is that Safari doesn't properly report the current styleproperty values. This may be possible in the Safari Nightlies, but Ihaven't tested yet. This is a major fallback of Safari, unfortunately.--JohnOn 8/18/06, Samuel Souder [EMAIL PROTECTED] wrote: I am running up against an issue I see in Safari.Lets say I have a div with some content in it assigned a class of'myClassName'. I then tell that class to be 'display: none;' in theCSS. Now for the odd part... When I ask $(".myClassName:hidden").show(); it doesn't show up!?So I made a test page up that checks $(".myClassName").is(":hidden")and what do you know, Safari says that it's visible not hidden!Am I doing something wrong here?NOTE: I have tried the same code on http://jquery.com/src/latest/sane/, http://jquery.com/src/beta/sane/, and http://jquery.com/src/dev/sane/ codebases.Thanks for your help!Sam___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ -- John Resighttp://ejohn.org/[EMAIL PROTECTED]___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ ___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Setting AJAX headers, and selecting namespaced nodes

2006-08-18 Thread Mitchell Lane
I've pinpointed both my issues, and would like to propose the following 
changes:

In jquery/jquery.js, line 356, replace:
$.g = {
'': m[2] == '*' || a.nodeName.toUpperCase() == m[2].toUpperCase(),
with:
$.g = {
'': m[2] == '*' || a.localName.toUpperCase() == m[2].toUpperCase(),
This would allow nodes with prefixes to still be addressed using the 
$(path, context) function (nodes such as 'D:response' can be addressed 
using the path response, etc.).

In ajax/ajax.js, line 12, replace function $.xml with:
$.xml = function( type, url, data, ret, headers ) {
var xml = new XMLHttpRequest();

if ( xml ) {
xml.open(type || GET, url, true);

if ( data )
xml.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');

if ( headers )
for ( var name in headers )
xml.setRequestHeader(name, headers[name]);

xml.onreadystatechange = function() {
if ( xml.readyState == 4 ) {
if ( ret ) ret(xml);
$.triggerAJAX( $.httpData(xml) );
}
};

xml.send(data);
}
};
This would allow the programmer to set and override their own HTTP headers.

If these changes or anything equivalent could be implemented, it'd be 
greatly appreciated!

— Mitch


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


Re: [jQuery] $(window).height() / .width()

2006-08-18 Thread John Resig
That would be really nice - I've been working with some developers who
are going to implement some aspects of this - unless you'd like to
beat them to it.

Honestly, this will have to be a jQuery 1.1 feature. ;) Bugs are a top
priority right now.

--John

On 8/18/06, Dave Cardwell [EMAIL PROTECTED] wrote:
 $(window).height() and .width() cause the error e.style has no properties.

 I think it would be preferable to modify .height and .width to handle
 window objects as a special case.

 A quick Google suggests using window.innerWidth, or where that is
 undefined document.body.offsetWidth.

 I just tested $('html').width() in Firefox 1.5.0.6 and IE6 and it
 returns the width of the window even when $('body').width() is
 explicitly set as lower.  Therefore, I believe $('html').width() would
 be preferable to document.body.offsetWidth.


 Any chance of this being implemented?  I'd like to use $(window).width()
 and .height() in an update to my jQMinMax plugin.


 Best wishes,
 Dave Cardwell ~ http://davecardwell.co.uk/

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



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

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


Re: [jQuery] Anyone explain why this won't work in Safari

2006-08-18 Thread John Resig
 Is there a problem with .ready?

Short answer: most likely not. However, your server seems to be down
so I can't check it right away to make sure.

--John

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


Re: [jQuery] Anyone explain why this won't work in Safari

2006-08-18 Thread Brian Wilkins
It would help if I typed in the correct address! Sorry about that...

http://www.aliasenterprises.com

Try this one.

Thanks,
Brian


John Resig wrote:
 Is there a problem with .ready?
 

 Short answer: most likely not. However, your server seems to be down
 so I can't check it right away to make sure.

 --John

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

   


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


Re: [jQuery] Anyone explain why this won't work in Safari

2006-08-18 Thread John Resig
Weeeird. Alright, well, whatever the bug was, it's been fixed in the
latest SVN version of jQuery:
http://jquery.com/src/jquery-svn.js

Man, that's a weird one.

--John

On 8/18/06, Brian Wilkins [EMAIL PROTECTED] wrote:
 It would help if I typed in the correct address! Sorry about that...

 http://www.aliasenterprises.com

 Try this one.

 Thanks,
 Brian


 John Resig wrote:
  Is there a problem with .ready?
 
 
  Short answer: most likely not. However, your server seems to be down
  so I can't check it right away to make sure.
 
  --John
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 
 


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



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

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


Re: [jQuery] Possible Safari bug with :hidden property

2006-08-18 Thread John Resig
It's all because Safari doesn't support the getComputedStyle property:
http://www.quirksmode.org/dom/w3c_css.html

To make things even worse, they claimed that it was going to work in
Safari 1.3+:
http://weblogs.mozillazine.org/hyatt/archives/2005_04.html#007962

I hope hope hope that I'm wrong here and that there's some magical
Safari method that I'm missing.

--John

On 8/18/06, Samuel Souder [EMAIL PROTECTED] wrote:

 Thanks for the quick followup John. I also run the WebKit nightlies and is
 is still broken as of today. Is there something I should be submitting to
 WebKit's bug reports? Lastly, do you know of any good ways around this?
 :hidden is a very cool selector and has a lot of great uses so I would
 obviously love to use it.

 On Aug 18, 2006, at 7:32 PM, John Resig wrote:

 The problem is that Safari doesn't properly report the current style
 property values. This may be possible in the Safari Nightlies, but I
 haven't tested yet. This is a major fallback of Safari, unfortunately.

 On 8/18/06, Samuel Souder [EMAIL PROTECTED] wrote:
 I am running up against an issue I see in Safari.

 Lets say I have a div with some content in it assigned a class of
 'myClassName'. I then tell that class to be 'display: none;' in the
 CSS. Now for the odd part... When I ask $(.myClassName:hidden).show
 (); it doesn't show up!?

 So I made a test page up that checks $(.myClassName).is(:hidden)
 and what do you know, Safari says that it's visible not hidden!

 Am I doing something wrong here?

 NOTE: I have tried the same code on http://jquery.com/src/latest/
 sane/, http://jquery.com/src/beta/sane/, and
 http://jquery.com/src/
 dev/sane/ codebases.

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


[jQuery] Safari doesn't like show()

2006-08-18 Thread Duncan Anker
Hi list,

After converting a drop-down menu script to jquery, our designer  
pointed out that the menu was no longer working under Safari.

I have tracked this down to the use of show() which, while it works  
perfectly under Firefox and Opera, does not seem to do anything under  
Safari. It does work when called as show('fast') or similar,  
however the animation effects are not desired.

The best compromise I can come up with is to call it with a value of  
1, however it still leads to a short delay before the menu displays,  
where it should display immediately.

Are there any work-arounds for this, or is it just something else  
Safari does badly?

Thanks in advance,
Duncan



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


[jQuery] Addition of loadSuccess call back

2006-08-18 Thread Taku Sano (Mikage Sawatari)
The following problems can be solved by adding the loadSuccess call back.

Problem:
Plug-in cannot notice contents added with $().load().
For instance, Thickbox plug-in can be used only by adding class=thickbox
to the link.
However, it doesn't operate well for contents of $().load().

Solution:
I add the loadSuccess call back to jQuery.
When $().load() is done, the loadSuccess call back is called.
Loaded HTML is passed to the argument of the call back.
The call back processes loaded HTML again.

Sample:
http://pepper.sherry.jp/jquery/thickbox/thickbox_load.html

Patch for addition of loadSuccess callback:
http://pepper.sherry.jp/jquery/thickbox/jquery-svn216.patch

Patch for thickbox:
http://pepper.sherry.jp/jquery/thickbox/thickbox.patch

I did not understand the code of the event processing of jQuery well.
Therefore, I do not have confidence that the patch was able to be made well.
Please confirm it.

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


[jQuery] Using . in id attributes confuses jQuery

2006-08-18 Thread John Beppu
I was playing around with jQuery today, and I came across something unfortunate.

I was in the habit of using the . character in id attributes.  For
example, if I had a page full of notes, the mark-up might look like:

div class=note id=note.33rd note/div
div class=note id=note.44th note/div

What's unfortunate is that:

  $('#note.3').size() == 0
  $('note.3').size()  == 0

The lesson here might be that even though . is a legal character[1]
to have in an id field, its existence in an id can conflict with CSS
selectors that interpret . as a sigil to signify that a class name
follows.  This really sucked, because I used the . character in id
attributes extensively (until now).

I hope that I can switch over to using : as a separator character to
use in my id attributes.  I also hope that it doesn't conflict with
CSS selectors or XPath, but I'm not sure on either count.

[1] http://www.w3.org/TR/xhtml1/#C_8

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


[jQuery] jQuery Boston

2006-08-18 Thread John Resig
Hey Everyone -

Just wondering if there's any jQuery users here in Boston, MA - I'm
going to be giving a presentation on jQuery on the 24th for the local
Drupal group. I'm not sure if it'll be recorded and/or transcribed -
but I'll be sure to throw any slides or examples online after its
done.

More info here:
http://drupal.org/node/79481

I'd love to be able to do a jQuery meetup sometime, maybe in
association with a big conference (OSCON, AJAX Experience?) But that's
for another post.

--John

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