Re: [jQuery] Stop using thickbox!

2006-11-27 Thread Klaus Hartl
Christopher Jordan schrieb:
 I see. So is it like the lesser of two evils (because IE doesn't comply 
 with all the standard CSS gizmos, like display: table-cell)? Either you 
 use tables, or you have to use conditional comments, and some other 
 CSS-for-IE hacks to make it work? Does that sound about right?

Hi Chris,

that's right. But: the only reason I can think of to use tables, is, 
that you can easily have content vertically aligned in the middle. That 
is what CSS honestly lacks.

This can also be achievend with a little dynamic property for IE, so 
that's one line for a hack versus improved accessibility plus increased 
flexibility/maintainability plus 50% less markup. That sounds like a 
good trade-off, doesn't it?


 And, is 
 this really a reason not to use the plug-in? I've used Gilles submodal 
 dialog code before and it's served me quite well, so I was excited to 
 use something else he'd written.

I've never stated I wouldn't use the plug-in. Once I'm going to use it, 
I'll CSSify it ;-)


-- Klaus

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


Re: [jQuery] John's metadata plugin in IE

2006-11-27 Thread Jörn Zaefferer
 The nested script element approach doesn't appear to work in IE6. Is this
 a know issue?
 
 jQuery.meta.setType(elem, script);
 alert($('#fooID').get(0).foo);
 
 div id=fooID
   script type=application/json{foo: 'bar'}/script
   Some text.
 /div
 
 I get undefined from the alert. The other approaches work, and this
 approach works fine in FF. I also tried the single data approach. The data
 object exists, but doesn't have my meta properties.

I can verify your result. Looks like John didn't test his initial 
implementation in IE.

--
Jörn Zaefferer

http://bassistance.de
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


[jQuery] Cleartype broken after $.load

2006-11-27 Thread Gerry Tucker
Okay, up front I know everyone is going to call me an ejit for not knowing this 
but I'll feign stupidity regardless.
 
I'm loading various DIVs on onclick ops using $.load, but the contents' fonts 
are being displayed with sharp edges in IE and occasionally FF.  I've seen 
pages in the past where the font is blurred, and I know there was a fix for 
that somewhere, but has anyone else experienced this?
 
Gerry
_
Be one of the first to try Windows Live Mail.
http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] Interface Draggables/Droppables: New approach

2006-11-27 Thread Paul Bakaus

Hi jQuerians!

I had a long conversation with Stefan today (the guy who started the
wonderful Interface library, for those of you who are new) about the
performance of drag and drop operations.
There are different approaches for both scriptaculous and interface and
real-life applications:

1.) Interface's approach:

Interface measures all possible droppables when initiating the drag.
Advantages: 1.) After drag initalizing, dragging is very fast, does not lag,
2.) option to highlight possible drag targets at start
Disadvantages: 1.) It takes a very long time to pick up a draggable, when
dealing with lots of droppables. (See the demo:
http://labs.pb-projects.de/test/index.html)

2.) Scriptaculous' approach:

Scriptaculous does nothing on drag start, but triggers a function everytime
you move the mouse (mousemove event), which than checks for the position
and looks if there is a overlapping droppable (droppable position by parsing
the dom tree).
Advantage: The dragging starts immediately.
Disadvantage: Dragging is very slow when dealing with lots of droppables
(especially deep nested ones). (See the demo:
http://labs.pb-projects.de/test/index2.html)

3.) Real world approach (Yahoo, Live Mail, others)

Instead of using the real draggable element, the use a helper div, which is
attached to the cursor. Notice: The cursor is not _over_ the helper, but has
an offset of i.e. -5/-5 relative to the helper.
Advantage: Very very fast in performance, because you can check for the
target/srcElement, rather than checking the position of droppables
Disadvantage: The cursor cannot be on top of the helper.

We now came to the conclusion that we should have 2 or 3 versions of
Draggables:

1.) The old one (Nifty but slow, for few droppables)
2.) The new one (Fast, event delegation [without parsing the DOM tree], but
needs some tweaking parameters every time)
3.) The helper draggables (very fast, cursor must be off the element)

For making it easier to decide which to use, we could provide a helper on
top, draggables.js, that automatically selects the preffered version in
regards of how many nodes you use for droppables and where the cursor
position is.

We are waiting for comments and ideas on this very important decision, since
it will be a major rewrite and change.

-Paul

--
Paul Bakaus
Web Developer
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread gilles
Finally some reactions.

I did not mean to say My plugin is better or something like that, just
wanted to get your attention to my plugin, because, like said, i can't
perfect it without you guys.

Some points mentioned by you guys:
* I'll try go get a CSS layout online as soon as possible.
* Some people who are complaining that it relies on interface. I had to,
if i wanted this funcionality myself the code got twice as big at least!
So that is the why, i hope you can understand. Something called
reusability :)
* Please define slow i know it is slow, but this is only the draggable
part in IE6, i don't know what is wrong there, since i use the bgiframe
hack which everybody uses.
* Glen, i don't have IE7 yet, but i'll try to fix this as soon as i can.

 I realize there's a smiley on the end, but this really /is/ a joke, right?
 Your plugin frankly isn't anywhere near ready for public use, as much as I
 wish it were.

Su, like said, don't give such a comment without giving some solutions or
problem areas on my test enviroment, windows with IE6 and FF 1.5.0.8 it
works fine. I can't fix what i don't see as broken.

p.s. who's Quicken?

-- Gilles


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


Re: [jQuery] John's metadata plugin in IE

2006-11-27 Thread Jörn Zaefferer
 I get undefined from the alert. The other approaches work, and this
 approach works fine in FF. I also tried the single data approach. The data
 object exists, but doesn't have my meta properties.

Found a fix. I can't commit it, looks like John's server disk is full (disk 
quota exceeded).

Until then, you can find the fixed version here: 
http://fuzz.bassistance.de/meta/metadata.js

At least the testsuite runs fine on FF1.5/IE6/IE7/Opera9/Safari1.3

Regards
Jörn
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-27 Thread Jörn Zaefferer
 For making it easier to decide which to use, we could provide a helper on
 top, draggables.js, that automatically selects the preffered version in
 regards of how many nodes you use for droppables and where the cursor
 position is.

That sounds great to me. If it is really only a matter of quanitity of 
droppables when considering which type of draggable to use, I'm all in for it.

I haven't worked with any draggables yet, therefore: The draggable window in 
Gille's plugin can stick with the current version, as there are no droppables, 
right?

--
Jörn Zaefferer

http://bassistance.de
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-27 Thread Felix Geisendörfer

Hi Paul,

thanks for this update. Yeah your example #1 (the current interface 
approach) demonstrates the problem of elements taking a long time to 
pick up very well. #2's drag lag is pretty bad too, but it still seems 
better then waiting 9 seconds (that's long how it took me on my dev 
machine) to pick up an element in example #1.


Option #3 sounds pretty good, but as I don't use Yahoo / Live Mail I 
can't try it out in order to get a feel very easily. So depending on how 
it works, I would probably like to see all 3 versions implemented. 
Making the function smart in terms of selecting the appropriate type 
itself if no user setting has been made sounds like a great idea too.


Other then that I would love to play around with experimental releases / 
svn HEAD or whatever would help you guys progressing on this. I could 
really need this feature ; ).


-- Felix
--
http://www.thinkingphp.org
http://www.fg-webdesign.de


Paul Bakaus wrote:

Hi jQuerians!

I had a long conversation with Stefan today (the guy who started the 
wonderful Interface library, for those of you who are new) about the 
performance of drag and drop operations.
There are different approaches for both scriptaculous and interface 
and real-life applications:


1.) Interface's approach:

Interface measures all possible droppables when initiating the drag.
Advantages: 1.) After drag initalizing, dragging is very fast, does 
not lag, 2.) option to highlight possible drag targets at start
Disadvantages: 1.) It takes a very long time to pick up a draggable, 
when dealing with lots of droppables. (See the demo: 
http://labs.pb-projects.de/test/index.html 
http://labs.pb-projects.de/test/index.html)


2.) Scriptaculous' approach:

Scriptaculous does nothing on drag start, but triggers a function 
everytime you move the mouse (mousemove event), which than checks 
for the position and looks if there is a overlapping droppable 
(droppable position by parsing the dom tree).

Advantage: The dragging starts immediately.
Disadvantage: Dragging is very slow when dealing with lots of 
droppables (especially deep nested ones). (See the demo: 
http://labs.pb-projects.de/test/index2.html)


3.) Real world approach (Yahoo, Live Mail, others)

Instead of using the real draggable element, the use a helper div, 
which is attached to the cursor. Notice: The cursor is not _over_ the 
helper, but has an offset of i.e. -5/-5 relative to the helper.
Advantage: Very very fast in performance, because you can check for 
the target/srcElement, rather than checking the position of droppables

Disadvantage: The cursor cannot be on top of the helper.

We now came to the conclusion that we should have 2 or 3 versions of 
Draggables:


1.) The old one (Nifty but slow, for few droppables)
2.) The new one (Fast, event delegation [without parsing the DOM 
tree], but needs some tweaking parameters every time)

3.) The helper draggables (very fast, cursor must be off the element)

For making it easier to decide which to use, we could provide a helper 
on top, draggables.js, that automatically selects the preffered 
version in regards of how many nodes you use for droppables and where 
the cursor position is.


We are waiting for comments and ideas on this very important decision, 
since it will be a major rewrite and change.


-Paul

--
Paul Bakaus
Web Developer


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


[jQuery] New plug-in: shortKeys

2006-11-27 Thread Rik Lomas
Hi guys,

I tried emailing this before, but it seems to be lost in the interweb.
Thought I'd let you know that I've released a new plug-in called
shortKeys, an easy way to implement web application keyboard
shortcuts, as seen in applications such as Gmail and Google Reader.
Any bugs, comments and general feedback would be greatly received.

http://rikrikrik.com/jquery/shortkeys/

Rik

-- 
Rik Lomas
http://rikrikrik.com

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


Re: [jQuery] Interface Draggables/Droppables: New approach

2006-11-27 Thread Paul Bakaus

Hi Jörn,

yes, it only affects Draggables that have Droppables, therefore Gilles can
stick to it.

2006/11/27, Jörn Zaefferer [EMAIL PROTECTED]:


 For making it easier to decide which to use, we could provide a helper
on
 top, draggables.js, that automatically selects the preffered version in
 regards of how many nodes you use for droppables and where the cursor
 position is.

That sounds great to me. If it is really only a matter of quanitity of
droppables when considering which type of draggable to use, I'm all in for
it.

I haven't worked with any draggables yet, therefore: The draggable window
in Gille's plugin can stick with the current version, as there are no
droppables, right?

--
Jörn Zaefferer

http://bassistance.de
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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





--
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Cleartype broken after $.load

2006-11-27 Thread Karl Swedberg

On Nov 27, 2006, at 5:28 AM, Gerry Tucker wrote:

 Okay, up front I know everyone is going to call me an ejit for not  
 knowing this but I'll feign stupidity regardless.

 I'm loading various DIVs on onclick ops using $.load, but the  
 contents' fonts are being displayed with sharp edges in IE and  
 occasionally FF.  I've seen pages in the past where the font is  
 blurred, and I know there was a fix for that somewhere, but has  
 anyone else experienced this?

Hi Gerry,
The only way I know of to fix this rendering bug is to define a  
background color for the DIV in your stylesheet. That has worked for me.

Karl

_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



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


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread Klaus Hartl
Christopher Jordan schrieb:
 Thanks for the response, Klaus. :o)
 
 Klaus Hartl wrote:
 Hi Chris,

 that's right. But: the only reason I can think of to use tables, is, 
 that you can easily have content vertically aligned in the middle. That 
 is what CSS honestly lacks.

 This can also be achievend with a little dynamic property for IE, so 
 that's one line for a hack versus improved accessibility plus increased 
 flexibility/maintainability plus 50% less markup. That sounds like a 
 good trade-off, doesn't it?

   
 so what's the hack? don't leave me hangin', brotha! :o)


Hi Christopher, wasn't sure if you are interested... here's a demo:
http://stilbuero.de/demo/vertical_centering/

One more thing to know: With JavaScript disabled in IE it will not be 
centered. I think that's acceptable, because it degrades well.


-- Klaus

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


[jQuery] datePicker plugin - inputClick bug fix and other alterations

2006-11-27 Thread Sam Collett
I've made a few changes to the Kelvin Luck's date picker plugin
(http://kelvinluck.com/assets/jquery/datePicker/). After adding the
ability to click the input to show the calendar it replaces any
existing css classes that may already exist on it (which I should have
caught when adding it). So I have changed it to use addClass instead
of attr({'class' : '...'}).

Along with that, I have reduced the number of times 'attr' is used:

i.e.
$(a).attr({'title' : 'Foo', 'rel'  : 'myrel', 'href' : 'javascript:;'})

becomes:
$(a).title('Foo').rel('myrel').href('javascript:;')

I have left alone those attributes that don't have a shorthand
equivalent (scope, abbr, cellspacing).

Download from:
http://www.texotela.co.uk/datePicker_source.zip

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


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread Karl Swedberg

On Nov 27, 2006, at 8:00 AM, [EMAIL PROTECTED] wrote:


p.s. who's Quicken?


Gilles,

Quicken is the #1 personal finance software in the world in terms of  
both sales and all-out excellence.

For more:
http://www.pcmag.com/article2/0,1895,1996812,00.asp

Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com


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


[jQuery] New plug-in: shortKeys

2006-11-27 Thread Rik Lomas
Hi guys,

Just thought I'd let you know that I've released a new plug-in called
shortKeys, an easy way to implement web application keyboard
shortcuts, as seen in applications such as Gmail and Google Reader.
Any bugs, comments and general feedback would be greatly received.

http://rikrikrik.com/jquery/shortkeys/

Rik
-- 
Rik Lomas
http://rikrikrik.com

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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread jyl
I tried it on IE6 and it did nothing for me. Maybe I'm doing it wrong? I
typed 'N' in the expectation of seeing the #shortcut div updated, didn't
happen.

--Jacob

 Hi guys,

 I tried emailing this before, but it seems to be lost in the interweb.
 Thought I'd let you know that I've released a new plug-in called
 shortKeys, an easy way to implement web application keyboard
 shortcuts, as seen in applications such as Gmail and Google Reader.
 Any bugs, comments and general feedback would be greatly received.

 http://rikrikrik.com/jquery/shortkeys/

 Rik

 --
 Rik Lomas
 http://rikrikrik.com

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




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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread jyl
OK never mind, it did work. I followed the instructions to the letter (eh)
and typed N not n. When I type n it does work.

--Jacob

 Hi guys,

 I tried emailing this before, but it seems to be lost in the interweb.
 Thought I'd let you know that I've released a new plug-in called
 shortKeys, an easy way to implement web application keyboard
 shortcuts, as seen in applications such as Gmail and Google Reader.
 Any bugs, comments and general feedback would be greatly received.

 http://rikrikrik.com/jquery/shortkeys/

 Rik

 --
 Rik Lomas
 http://rikrikrik.com

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




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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread Sam Collett
On 27/11/06, Rik Lomas [EMAIL PROTECTED] wrote:
 Hi guys,

 I tried emailing this before, but it seems to be lost in the interweb.
 Thought I'd let you know that I've released a new plug-in called
 shortKeys, an easy way to implement web application keyboard
 shortcuts, as seen in applications such as Gmail and Google Reader.
 Any bugs, comments and general feedback would be greatly received.

 http://rikrikrik.com/jquery/shortkeys/

 Rik

 --
 Rik Lomas
 http://rikrikrik.com

Yet another quality plugin. Shame it doesn't work with modifier keys.
Without knowledge of the keyboard shortcuts on all the browsers this
works on, you can't really have consistent shortcuts across browsers
(I think even major sites have conflicts with browsers). Isn't
Alt+Shift normally available though (as that combination isn't used
that often)?

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


Re: [jQuery] datePicker plugin - inputClick bug fix and other alterations

2006-11-27 Thread Brandon Aaron
On 11/27/06, Sam Collett [EMAIL PROTECTED] wrote:
 Along with that, I have reduced the number of times 'attr' is used:

 i.e.
 $(a).attr({'title' : 'Foo', 'rel'  : 'myrel', 'href' : 'javascript:;'})

 becomes:
 $(a).title('Foo').rel('myrel').href('javascript:;')

I'm curious why you have done this?

Those helper methods might be deprecated from the core in the 1.1 release.

--
Brandon Aaron

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


Re: [jQuery] John's metadata plugin in IE

2006-11-27 Thread John Resig
Try committing it again - I fixed the issues with the server.

--John

On 11/27/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
  I get undefined from the alert. The other approaches work, and this
  approach works fine in FF. I also tried the single data approach. The data
  object exists, but doesn't have my meta properties.

 Found a fix. I can't commit it, looks like John's server disk is full (disk 
 quota exceeded).

 Until then, you can find the fixed version here: 
 http://fuzz.bassistance.de/meta/metadata.js

 At least the testsuite runs fine on FF1.5/IE6/IE7/Opera9/Safari1.3

 Regards
 Jörn
 --
 Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
 Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


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


Re: [jQuery] Make jCarousel Loop?

2006-11-27 Thread agent2026

Using the built in wrap, setting viewable images to 1 and using no animation
the carousel is visually looping in the next direction back to the
beginning.  This is good enough for me in that direction, but there must be
some way to modify the first image 'prev' link to scroll to the last image.

If I can set carousel.scroll([item]); in a callback function, then I figure
I should be able to set a 'disabled' prev button to call a similar function
like carousel.scroll([last]);. As the first line item is already having it's
prev state changed to disabled, I thought this could be a good line to
follow for changing the prev item value from null to last (I've changed my
css so disable is the same as enabled).

Sounds good to me, but I can't figure out how to do it :).  Hope someone can
help with this.

Adam
-- 
View this message in context: 
http://www.nabble.com/Make-jCarousel-Loop--tf2668238.html#a7563217
Sent from the jCarousel mailing list archive at Nabble.com.


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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread Dave Methvin
 http://rikrikrik.com/jquery/shortkeys/

 Without knowledge of the keyboard shortcuts on all the
 browsers this works on, you can't really have consistent
 shortcuts across browsers (I think even major sites have
 conflicts with browsers).

It's  just a fact of life if you're a keyboard user. All the browsers use
different Alt-key accelerators for their menu items, since the menu items
have different names. Only a few like File and Edit are consistent. Firefox
keyboard shortcuts aren't consistent across platforms in some cases. With
IE7 it's truly weird, the menu isn't even there normally but appears when
you tap the Alt key. That is the most consistent cross-browser way to use
the menu from the keyboard, tap Alt and then press the key for the menu.

 Isn't Alt+Shift normally available though (as that
 combination isn't used that often)?

Yes, if you have an accessKey=X attribute defined for a link, form or
button element the browser will invoke it when you press Alt+Shift+X and
sometimes Alt+X depending on the browser. AccessKeys will override menu
accelerators with the same letter, at least on IE and Firefox. Also, IE uses
Alt+D to set focus to the Address bar. 

I have some code that highlights accessKeys here; it's not in fighting shape
(doesn't work in Opera for example) but might be useful to someone. 

http://methvin.com/jquery/jq-access.html



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


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread Klaus Hartl
Giuliano Marcangelo schrieb:
 so briefly to sum up..
 
 mark up  is more lightweight,
 page displays quicker,
 mark up is vastly more flexible/versatile/reusable.

Thanks Giuliano for the assistance :-)

I had mentioned bloated HTML and inflexibility (a more inflexible
solution than you think in the first place) somewhat earlier in the 
thread in reply to Christopher and thought this fact is quite clear anyway.

I think your example could use even less markup:

div class=rbt
   div
 div/div
   /div
/div

could probalbly be replaced with:

div class=rbt
/div


Thanks again :-)


-- Klaus

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


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread Theo Welch
Here's another (probably older) approach to vertical centering with CSS I've
been using for a while. 

http://www.wpdfd.com/editorial/thebox/deadcentre3.html

This one doesn't need any proprietary IE code to get the centering to work
in IE, but it does require a bit of extra markup as well as using 'absolute'
positioning which can be a hassle in some situations.

I haven't tested the technique Klaus linked to, but I think I actually I
like that one better for most situations
(http://stilbuero.de/demo/vertical_centering/).  

Thanks for sharing, Klaus! :)

-THEO-



-Original Message-
From: Klaus Hartl [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 27, 2006 10:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Stop using thickbox!

Christopher Jordan schrieb:
 Thanks for the response, Klaus. :o)
 
 Klaus Hartl wrote:
 Hi Chris,

 that's right. But: the only reason I can think of to use tables, is, 
 that you can easily have content vertically aligned in the middle. That 
 is what CSS honestly lacks.

 This can also be achievend with a little dynamic property for IE, so 
 that's one line for a hack versus improved accessibility plus increased 
 flexibility/maintainability plus 50% less markup. That sounds like a 
 good trade-off, doesn't it?

   
 so what's the hack? don't leave me hangin', brotha! :o)


Hi Christopher, wasn't sure if you are interested... here's a demo:
http://stilbuero.de/demo/vertical_centering/

One more thing to know: With JavaScript disabled in IE it will not be 
centered. I think that's acceptable, because it degrades well.


-- Klaus




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


[jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Jörn Zaefferer
Hi folks,

the discussion so far led to the conclusion to remove all those macros 
for css() and attr(), eg. color() or val(). css() and attr() are already 
quite flexible: Both allow you to get a single property, set a single 
property or set a set of properties. I wonder if it would help to extend 
them to allow getting of multiple properties at once. A possible 
implementation would accept an array of String and returns a key/value 
object, with the values of the array as the keys. Is this useful?

Another interesting point that needs some discussion:
The event system is improved by accepting:
 - an amount paramter (the number of times to execute an event handler, 
default is infinite) and additional data when binding events
 - an bubble paramter (to trigger handlers of parent elements) and 
additional data when triggering events programmatically
The big so far unsolved question: What should the API methods look like? 
How to pass the additional data to the event handler?

Currently I favor an interface that looks like this:
$().bind(type of event, eventHandler, {amount: 5, data: additionalStuff})
$().trigger(type of event, {bubble: true, data: moreStuff});
This avoids any type checking of arguments and provides a clear API: A 
little bit more to type, yet less confusion when you need only one of 
the optional paramters.

Possible interfaces for the event handlers:
$().bind(click, function(event, bindData, triggerData) { ... });
$().bind(click, function(event) {
event.bind // contains bind data
event.trigger // contains trigger data
});

Your opinions?

-- 
Jörn Zaefferer

http://bassistance.de


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


[jQuery] jQuery sIFR question

2006-11-27 Thread Andy Matthews
I have one question about this plugin.

I've downloaded the files from Gilles website and just have 2 questions.

1) What version of sIFR is jIFR based upon?
2) If it's based on version 1.0 then do you have an FLA that I could get
from you? sIFR itself is now on 2.0 and it appears that the 1.0 page doesn't
have a link to the FLA any longer. I want to make sure I'm using the correct
version so my code works properly.

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


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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread Marshall Salinger
Excellent plug-in! Does anyone know the key-codes to use the left and
right arrows on the keyboard?

Thanks,
Marshall

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Rik Lomas
Sent: Monday, November 27, 2006 7:32 AM
To: jQuery Discussion.
Subject: [jQuery] New plug-in: shortKeys

Hi guys,

I tried emailing this before, but it seems to be lost in the interweb.
Thought I'd let you know that I've released a new plug-in called
shortKeys, an easy way to implement web application keyboard
shortcuts, as seen in applications such as Gmail and Google Reader.
Any bugs, comments and general feedback would be greatly received.

http://rikrikrik.com/jquery/shortkeys/

Rik

-- 
Rik Lomas
http://rikrikrik.com

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


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


Re: [jQuery] jQuery sIFR question

2006-11-27 Thread Sam Sherlock

i have ued the fla in the sifr package - which works fine

On 27/11/06, Andy Matthews [EMAIL PROTECTED] wrote:


I have one question about this plugin.

I've downloaded the files from Gilles website and just have 2 questions.

1) What version of sIFR is jIFR based upon?
2) If it's based on version 1.0 then do you have an FLA that I could get
from you? sIFR itself is now on 2.0 and it appears that the 1.0 page
doesn't
have a link to the FLA any longer. I want to make sure I'm using the
correct
version so my code works properly.

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


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

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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread Sam Collett
On 27/11/06, Marshall Salinger [EMAIL PROTECTED] wrote:
 Excellent plug-in! Does anyone know the key-codes to use the left and
 right arrows on the keyboard?

 Thanks,
 Marshall

Left = 37
Right = 39

Others you may find useful:

Backspace = 8
Tab = 9
Enter = 13
End = 35
Home = 36

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


Re: [jQuery] jQuery sIFR question

2006-11-27 Thread Andy Matthews
Which sifr package? The v1.0 link is no longer available. Are you referring
to the 2.0 FLA file?
!//--
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 Sam Sherlock
  Sent: Monday, November 27, 2006 11:44 AM
  To: jQuery Discussion.
  Subject: Re: [jQuery] jQuery sIFR question


  i have ued the fla in the sifr package - which works fine


  On 27/11/06, Andy Matthews [EMAIL PROTECTED] wrote:
I have one question about this plugin.

I've downloaded the files from Gilles website and just have 2 questions.

1) What version of sIFR is jIFR based upon?
2) If it's based on version 1.0 then do you have an FLA that I could get
from you? sIFR itself is now on 2.0 and it appears that the 1.0 page
doesn't
have a link to the FLA any longer. I want to make sure I'm using the
correct
version so my code works properly.

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


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


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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Sam Collett
On 27/11/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Hi folks,

 the discussion so far led to the conclusion to remove all those macros
 for css() and attr(), eg. color() or val(). css() and attr() are already
 quite flexible: Both allow you to get a single property, set a single
 property or set a set of properties. I wonder if it would help to extend
 them to allow getting of multiple properties at once. A possible
 implementation would accept an array of String and returns a key/value
 object, with the values of the array as the keys. Is this useful?

 Another interesting point that needs some discussion:
 The event system is improved by accepting:
  - an amount paramter (the number of times to execute an event handler,
 default is infinite) and additional data when binding events
  - an bubble paramter (to trigger handlers of parent elements) and
 additional data when triggering events programmatically
 The big so far unsolved question: What should the API methods look like?
 How to pass the additional data to the event handler?

 Currently I favor an interface that looks like this:
 $().bind(type of event, eventHandler, {amount: 5, data: additionalStuff})
 $().trigger(type of event, {bubble: true, data: moreStuff});
 This avoids any type checking of arguments and provides a clear API: A
 little bit more to type, yet less confusion when you need only one of
 the optional paramters.

 Possible interfaces for the event handlers:
 $().bind(click, function(event, bindData, triggerData) { ... });
 $().bind(click, function(event) {
 event.bind // contains bind data
 event.trigger // contains trigger data
 });

 Your opinions?

 --
 Jörn Zaefferer

 http://bassistance.de

The problem with removing all the helper methods is that some are very
heavily used (especially val and click). While that may reduce
jQuery's file size, it will increase the size of many plugins and
pages that use jQuery.

Moving out of core may be a good idea if file size really is that
important (many have broadband or fast dialup and you can always use
gzip compression on the server), but it would still be good if these
(or at least the most used ones) were still part of the default
download (i.e. http://jquery.com/src/jquery-latest.js).

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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread ashutosh bijoor

Masterpiece! Thanks a ton! This is another great milestone in jquery.
Regards
Ashutosh

On 11/27/06, Sam Collett [EMAIL PROTECTED] wrote:


On 27/11/06, Marshall Salinger [EMAIL PROTECTED] wrote:
 Excellent plug-in! Does anyone know the key-codes to use the left and
 right arrows on the keyboard?

 Thanks,
 Marshall

Left = 37
Right = 39

Others you may find useful:

Backspace = 8
Tab = 9
Enter = 13
End = 35
Home = 36

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

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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Jörn Zaefferer
Sam Collett schrieb:
 The problem with removing all the helper methods is that some are very
 heavily used (especially val and click). While that may reduce
 jQuery's file size, it will increase the size of many plugins and
 pages that use jQuery.
   
The basic problem: The API cluttering. There are 2 methods for each attr 
macro and 2 methods for each css macro. They can all be handled by using 
attr and css directly. On the other side, it is easy to add them back 
when really needed, or provided as a compability plugin.
 Moving out of core may be a good idea if file size really is that
 important (many have broadband or fast dialup and you can always use
 gzip compression on the server), but it would still be good if these
 (or at least the most used ones) were still part of the default
 download (i.e. http://jquery.com/src/jquery-latest.js).
   
This isn't so much about file size, more about a clean API. Currently 
the core has simply to many methods that do pretty much the same.

-- 
Jörn Zaefferer

http://bassistance.de


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


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread Jörn Zaefferer
Theo Welch schrieb:
 Here's another (probably older) approach to vertical centering with CSS I've
 been using for a while. 

 http://www.wpdfd.com/editorial/thebox/deadcentre3.html

 This one doesn't need any proprietary IE code to get the centering to work
 in IE, but it does require a bit of extra markup as well as using 'absolute'
 positioning which can be a hassle in some situations.
   
But that wouldn't stop it from scrolling out of the viewport, would it?

Actually the best approach for fixed positioning seems to a very 
different approach: Prevent the entire page from scrolling and let only 
the overflowing parts scroll. That way you can stick to absolute 
positioning and everything is fine. Not quite applicable to most 
layouts, but still in intersting option when starting from scratch.

-- 
Jörn Zaefferer

http://bassistance.de


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


Re: [jQuery] jQuery sIFR question

2006-11-27 Thread Andy Matthews
Okay. I found the FLA in the 2.0 package and it's working. Thanks.

!//--
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 Andy Matthews
  Sent: Monday, November 27, 2006 11:55 AM
  To: jQuery Discussion.
  Subject: Re: [jQuery] jQuery sIFR question


  Which sifr package? The v1.0 link is no longer available. Are you
referring to the 2.0 FLA file?
  !//--
  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 Sam Sherlock
Sent: Monday, November 27, 2006 11:44 AM
To: jQuery Discussion.
Subject: Re: [jQuery] jQuery sIFR question


i have ued the fla in the sifr package - which works fine


On 27/11/06, Andy Matthews [EMAIL PROTECTED] wrote:
  I have one question about this plugin.

  I've downloaded the files from Gilles website and just have 2
questions.

  1) What version of sIFR is jIFR based upon?
  2) If it's based on version 1.0 then do you have an FLA that I could
get
  from you? sIFR itself is now on 2.0 and it appears that the 1.0 page
doesn't
  have a link to the FLA any longer. I want to make sure I'm using the
correct
  version so my code works properly.

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


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


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


Re: [jQuery] Stop using thickbox!

2006-11-27 Thread jyl
The example on wpdfd.com is also dead slow on my IE6 when resizing
horizontally. It performs well when resizing vertically. Hmm.

--Jacob

 Theo Welch schrieb:
 Here's another (probably older) approach to vertical centering with CSS
 I've
 been using for a while.

 http://www.wpdfd.com/editorial/thebox/deadcentre3.html

 This one doesn't need any proprietary IE code to get the centering to
 work
 in IE, but it does require a bit of extra markup as well as using
 'absolute'
 positioning which can be a hassle in some situations.

 But that wouldn't stop it from scrolling out of the viewport, would it?

 Actually the best approach for fixed positioning seems to a very
 different approach: Prevent the entire page from scrolling and let only
 the overflowing parts scroll. That way you can stick to absolute
 positioning and everything is fine. Not quite applicable to most
 layouts, but still in intersting option when starting from scratch.

 --
 Jörn Zaefferer

 http://bassistance.de


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




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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Brandon Aaron
On 11/27/06, Sam Collett [EMAIL PROTECTED] wrote:
 The problem with removing all the helper methods is that some are very
 heavily used (especially val and click). While that may reduce
 jQuery's file size, it will increase the size of many plugins and
 pages that use jQuery.

In addition to what Jörn said about cleaning up the API, it is about
reducing confusion about what .click() and other event methods
actually do or don't do.

--
Brandon Aaron

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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Brandon Aaron
On 11/27/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Currently I favor an interface that looks like this:
 $().bind(type of event, eventHandler, {amount: 5, data: additionalStuff})
 $().trigger(type of event, {bubble: true, data: moreStuff});
 This avoids any type checking of arguments and provides a clear API: A
 little bit more to type, yet less confusion when you need only one of
 the optional paramters.

 Possible interfaces for the event handlers:
 $().bind(click, function(event, bindData, triggerData) { ... });
 $().bind(click, function(event) {
 event.bind // contains bind data
 event.trigger // contains trigger data
 });

 Your opinions?

I think I prefer the suggestion made by Dave Methvin of using on() and
un() instead of bind.

$().on('click')
$().un('click')

Also maybe event.bind and event.trigger should have 'Data' appended to
the end to be more clear about what it is.

Also don't forget to clear out any added properties to the event
object in IE or it will leak.

--
Brandon Aaron

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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Jörn Zaefferer
Brandon Aaron schrieb:
 I think I prefer the suggestion made by Dave Methvin of using on() and
 un() instead of bind.

 $().on('click')
 $().un('click')
   
Thanks Brandon, just forgot to mention that.
 Also maybe event.bind and event.trigger should have 'Data' appended to
 the end to be more clear about what it is.

 Also don't forget to clear out any added properties to the event
 object in IE or it will leak.
   
That's the problem, therefore I favor the paramter approach. While it is 
no problem to clean up the added data after the handler was called, 
closures could make that ugly. Consider this little example:

$().bind(click, function(event) {
// event.bindData is available here
$().bind(whatever, function() {
   // event.bindData is not available!
});
}, {stuff: foobar});

-- 
Jörn Zaefferer

http://bassistance.de


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


Re: [jQuery] Feature Request for $(expr, context)

2006-11-27 Thread Linan Wang

Hi Mathias,

It's an interesting idea. I think the better way to implement it is to using
DocumentFragment.
Codes:

var fragment=document.createDocumentFragment();
fragment.innerHTML=html;
$(exp,fragment).whatever_youlike_function




On 11/24/06, Mathias Bank [EMAIL PROTECTED] wrote:


Hi,

$(expr, context) is a really nice function, but it could be optimized.
Until now, it can only be used, if context is a dom tree. But see this
scenario:

var html='';
html += ul;
for (var i=0; i10;i++) {
  html += lilisting +i+/li;
}
html+='/ul';

Now, it would be great, if you could apply every jQuery function like
$('li',html).css(color, red);

Until know, I have to create a dom element like

$('body').append('div id=helper/div');
$('#helper').html(html);
$('#helper li',html).css(color,red);
html = $('#helper').html();
$('#helper').remove();


That does not look good at all. Is there a way to realize this
behaviour in jQuery-Core?


Mathias

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





--
Best regards

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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Andrea Ercolino


Jörn Zaefferer wrote:
 
 ...
 The big so far unsolved question: What should the API methods look like? 
 How to pass the additional data to the event handler?
 
 Currently I favor an interface that looks like this:
 $().bind(type of event, eventHandler, {amount: 5, data:
 additionalStuff})
 $().trigger(type of event, {bubble: true, data: moreStuff});
 ...
 Your opinions?
 

I hope the event shortcuts will remain, like click( handler ) to bind and
click() to trigger.

As for the bind style, I think the handler should always be the last
argument, because to me it's cleaner this: 

$( div ).bind( click, {amount: 1}, function() {
doClick();
} );

than this:

$( div ).bind( click, function() {
doClick();
}, {amount: 1} );

Sure having the function at the bottom makes optional arguments a little
more complitated, and if you think it's better to avoid all those type
checking in the code (I think the same) then the solution is to have no
optional arguments at all, like this:

$( div ).bind( click, {}, function() {
doClick();
} );

This style adds a bit of self-documentation to the script, making it clear
that we are using default values for the second argument.

-- 
View this message in context: 
http://www.nabble.com/jQuery-1.1-API-improvements-%28macros%2C-events%29-tf2713203.html#a7565490
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Feature Request for $(expr, context)

2006-11-27 Thread Jörn Zaefferer
Mathias Bank schrieb:
 Until know, I have to create a dom element like

 $('body').append('div id=helper/div');
 $('#helper').html(html);
 $('#helper li',html).css(color,red);
 html = $('#helper').html();
 $('#helper').remove();
   
How about this:
html = $(html).find(li).css(color, red).html();

Looks good for me, jQury already takes the burden from you to create the 
helper.

-- 
Jörn Zaefferer

http://bassistance.de


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


Re: [jQuery] Make jCarousel Loop?

2006-11-27 Thread Jan Sorgalla

Hi,

try that (untested):

Replace the line

priv.scroll(priv.first - priv.o.itemScroll);

with

priv.scroll((priv.o.wrap  priv.first == 1) ? priv.size -
priv.o.itemVisible + 1 : priv.first - priv.o.itemScroll);

Jan


agent2026 wrote:
 
 Using the built in wrap, setting viewable images to 1 and using no
 animation the carousel is visually looping in the next direction back to
 the beginning.  This is good enough for me in that direction, but there
 must be some way to modify the first image 'prev' link to scroll to the
 last image.
 
 If I can set carousel.scroll([item]); in a callback function, then I
 figure I should be able to set a 'disabled' prev button to call a similar
 function like carousel.scroll([last]);. As the first line item is already
 having it's prev state changed to disabled, I thought this could be a good
 line to follow for changing the prev item value from null to last (I've
 changed my css so disable is the same as enabled).
 
 Sounds good to me, but I can't figure out how to do it :).  Hope someone
 can help with this.
 
 Adam
 

-- 
View this message in context: 
http://www.nabble.com/Make-jCarousel-Loop--tf2668238.html#a7565628
Sent from the jCarousel mailing list archive at Nabble.com.


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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Brandon Aaron
On 11/27/06, Andrea Ercolino [EMAIL PROTECTED] wrote:
 I hope the event shortcuts will remain, like click( handler ) to bind and
 click() to trigger.

They will stick around but in a compatibility plugin.

 As for the bind style, I think the handler should always be the last
 argument, because to me it's cleaner this:

 $( div ).bind( click, {amount: 1}, function() {
 doClick();
 } );

 than this:

 $( div ).bind( click, function() {
 doClick();
 }, {amount: 1} );

I would disagree. It would cause more code in the core and more
confusion. It is pretty universal across libraries and browser that
the paramater order goes: type, method.

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


[jQuery] Tablesorter and pager

2006-11-27 Thread nsj

Just looking for some guidance / examples on using the excellent tablesorter
plugin but combined with pager. I've a number of large tables and really
need them to span multiple pages. I've seen the demo version at
http://motherrussia.polyester.se/pub/jquery/demos/pager/ but the code in
this doesn't work with the newer version of tablesorter.

Thanks 

N
-- 
View this message in context: 
http://www.nabble.com/Tablesorter-and-pager-tf2712251.html#a7561458
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Jörn Zaefferer
Andrea Ercolino schrieb:
 I hope the event shortcuts will remain, like click( handler ) to bind and
 click() to trigger.
   
So far bind() would be on() and unbind() would be un(). The shortcuts 
would be removed from the default distribution, but still available as a 
compatibility plugin.
 As for the bind style, I think the handler should always be the last
 argument, because to me it's cleaner this: 

 $( div ).bind( click, {amount: 1}, function() {
   doClick();
 } );

 than this:

 $( div ).bind( click, function() {
   doClick();
 }, {amount: 1} );
   
How about this:
var handler = function() { ... };
$(div).bind(click, handler, {amount: 1});
 Sure having the function at the bottom makes optional arguments a little
 more complitated, and if you think it's better to avoid all those type
 checking in the code (I think the same) then the solution is to have no
 optional arguments at all, like this:

 $( div ).bind( click, {}, function() {
   doClick();
 } );

 This style adds a bit of self-documentation to the script, making it clear
 that we are using default values for the second argument.
   
But the empty object would be still be passed around, creating 
unncessary overhead. The default is nothing, therefore you should at 
least use null as the second argument. Still I don't like an API that 
forces me to pass null around all the time.

-- 
Jörn Zaefferer

http://bassistance.de


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


Re: [jQuery] datePicker plugin - inputClick bug fix and other alterations

2006-11-27 Thread Sam Collett
On 27/11/06, Brandon Aaron [EMAIL PROTECTED] wrote:
 On 11/27/06, Sam Collett [EMAIL PROTECTED] wrote:
  Along with that, I have reduced the number of times 'attr' is used:
 
  i.e.
  $(a).attr({'title' : 'Foo', 'rel'  : 'myrel', 'href' : 'javascript:;'})
 
  becomes:
  $(a).title('Foo').rel('myrel').href('javascript:;')

 I'm curious why you have done this?

 Those helper methods might be deprecated from the core in the 1.1 release.

 --
 Brandon Aaron

I've changed it to use attr to set attributes (addClass is still used
to set the class) and noticed that 'val' was used instead of attr to
get the value (so that has been fixed too). Download link is till the
same.

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


Re: [jQuery] Tabs plugin callbacks - what makes most sense?

2006-11-27 Thread Glen Lipka



$('...').tabs({
onClick: function(clicked) {
if (clicked == particularTab) {
// do soemthing
}
}
});



Having trouble with this.
How can I tell what is clicked?  I have ID's to differentiate the tabs.
Shouldn't I use show instead click anyway?  $(this) is the document.
How do I get the tab clicked on or the panel shown?

Confused! :)

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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Andrea Ercolino


Jörn Zaefferer wrote:
 
 So far bind() would be on() and unbind() would be un(). The shortcuts 
 would be removed from the default distribution, but still available as a 
 compatibility plugin.
 

Don't remove the shortcuts, please! They are very convenient for the events.
I can understand that css() and attr() can be enough. But click() as it is
now is Easy and Clear and Convenient. The unbind could be incorporated into
click() too, for example by using click( null ); 
http://www.nabble.com/jQuery-API-discussion-tf2463514.html#a6867849 as I
suggested before .


Jörn Zaefferer wrote:
 
 How about this:
 var handler = function() { ... };
 $(div).bind(click, handler, {amount: 1});
 
OK, it won't be so different after all, having the options at the bottom.


Jörn Zaefferer wrote:
 
 But the empty object would be still be passed around, creating 
 unncessary overhead. The default is nothing, therefore you should at 
 least use null as the second argument. Still I don't like an API that 
 forces me to pass null around all the time.
 
OK I've already given up on this. 
Anyway the default is not nothing, I think it's {amount: infinity} for
events.

-- 
View this message in context: 
http://www.nabble.com/jQuery-1.1-API-improvements-%28macros%2C-events%29-tf2713203.html#a7566749
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread Erik Beeson

Since we're on the subject, I find this page pretty helpful for figuring out
keycodes: http://www.ryancooper.com/resources/keycode.asp

--Erik

On 11/27/06, Sam Collett [EMAIL PROTECTED] wrote:


On 27/11/06, Marshall Salinger [EMAIL PROTECTED] wrote:
 Excellent plug-in! Does anyone know the key-codes to use the left and
 right arrows on the keyboard?

 Thanks,
 Marshall

Left = 37
Right = 39

Others you may find useful:

Backspace = 8
Tab = 9
Enter = 13
End = 35
Home = 36

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

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


Re: [jQuery] New plug-in: shortKeys

2006-11-27 Thread Sam Collett
On 27/11/06, Erik Beeson [EMAIL PROTECTED] wrote:
 Since we're on the subject, I find this page pretty helpful for figuring out
 keycodes: http://www.ryancooper.com/resources/keycode.asp

 --Erik

This demo which I did a while ago shows how the keyCode/charCode
varies onkeypress/down/up (keydown/keyup always returns the upper-case
code when you press a letter).

http://www.texotela.co.uk/keypress.php

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


[jQuery] Hiding a row in a table

2006-11-27 Thread Bruce MacKay

Hi folks,

I have a tabulated set of data (table id=tbl_assetList), with the 
last column of each row providing a delete it link to the following 
function...


function fnDeleteNodeTransaction(ni,pi,ai){
$(#theIndicator3).show();
$(#tbl_assetList a).click(function(){$(tr).hide()});
$.get(scripts/ajax_ramosus_editor.asp?id=4pblID=+pi+iAssetID=+ai+nodeID=+ni, 
function(responseText){


$(#currentAssetsTable).html(responseText).highlightFade({color:'yellow',speed:2000,iterator:'sinusoidal'});
$(#theIndicator3).hide();
});
}

My attempt at hiding the deleted item's row (line 3)  is successful 
in hiding the entire table for reasons that are not obvious to me, 
but I suspect are clearly obvious to you.


I'd appreciate some illumination here.

Thanks,

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


Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Erik Beeson

$(tr).hide() matches all tr tags and hides them. If you want to hide the
tr that contained the link that was clicked, you might try something like
this:

$(#tbl_assetList a).click(function(){$(this).ancestors(tr).hide()});

That will hide all the TR tags that are up the DOM tree from the clicked
link. That may have undesirable affects if you have nested tables, but that
could be worked around.

--Erik

On 11/27/06, Bruce MacKay [EMAIL PROTECTED] wrote:


 Hi folks,

I have a tabulated set of data (table id=tbl_assetList), with the last
column of each row providing a delete it link to the following function...

function fnDeleteNodeTransaction(ni,pi,ai){
$(#theIndicator3).show();
$(#tbl_assetList a).click(function(){$(tr).hide()});

$.get(scripts/ajax_ramosus_editor.asp?id=4pblID=+pi+iAssetID=+ai+nodeID=+ni,
function(responseText){

$(#currentAssetsTable).html(responseText).highlightFade({color:'yellow',speed:2000,iterator:'sinusoidal'});
$(#theIndicator3).hide();
});
}

My attempt at hiding the deleted item's row (line 3)  is successful in
hiding the entire table for reasons that are not obvious to me, but I
suspect are clearly obvious to you.

I'd appreciate some illumination here.

Thanks,

Bruce

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



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


Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Bruce MacKay

Thanks Erik,

Unfortunately your line of code hid all the rows in the table, 
including the one that was clicked.  If I just wanted to hide the row 
that was clicked, how would your line be altered?


Bruce



At 10:38 a.m. 28/11/2006, you wrote:
$(tr).hide() matches all tr tags and hides them. If you want to 
hide the tr that contained the link that was clicked, you might try 
something like this:


$(#tbl_assetList a).click(function(){$(this).ancestors(tr).hide()});

That will hide all the TR tags that are up the DOM tree from the 
clicked link. That may have undesirable affects if you have nested 
tables, but that could be worked around.


--Erik

On 11/27/06, Bruce MacKay 
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:

Hi folks,

I have a tabulated set of data (table id=tbl_assetList), with the 
last column of each row providing a delete it link to the 
following function...


function fnDeleteNodeTransaction(ni,pi,ai){
$(#theIndicator3).show();
$(#tbl_assetList a).click(function(){$(tr).hide()});

$.get(scripts/ajax_ramosus_editor.asp?id=4pblID=+pi+iAssetID=+ai+nodeID=+ni, 
function(responseText){


$(#currentAssetsTable).html(responseText).highlightFade({color:'yellow',speed:2000,iterator:'sinusoidal'});
$(#theIndicator3).hide();
});
}

My attempt at hiding the deleted item's row (line 3)  is successful 
in hiding the entire table for reasons that are not obvious to me, 
but I suspect are clearly obvious to you.


I'd appreciate some illumination here.

Thanks,

Bruce

___
jQuery mailing list
mailto:discuss@jquery.comdiscuss@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] Hiding a row in a table

2006-11-27 Thread Brandon Aaron
On 11/27/06, Bruce MacKay [EMAIL PROTECTED] wrote:

  Thanks Erik,

  Unfortunately your line of code hid all the rows in the table, including
 the one that was clicked.  If I just wanted to hide the row that was
 clicked, how would your line be altered?

You could try to just call .parent('tr') instead of ancestors.

--
Brandon Aaron

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


Re: [jQuery] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Dave Methvin
 
 Don't remove the shortcuts, please! They are very convenient
 for the events. I can understand that css() and attr() can be
 enough. But click() as it is now is Easy and Clear and Convenient.
 The unbind could be incorporated into click() too, for example
 by using click( null );

Event shortcuts are the major namespace polluter. Each one requires an
implementation, which is usually rather simple, but also documentation. What
about the ability to pass data from the bind or trigger handlers, how would
that be done? If it's not added to these interfaces, then you'll end up with
a mix of .click() and .on(click, fn, {data: whatever}) in the page. If it
is added, then there are a couple of dozen event-methods that require
additional explanation for how they behave.

You can't unbind a single click handler with the .click(null) approach; you
can only unbind all click handlers for the element. That becomes very
important when a page uses multiple plugins that may need event handlers. In
a plugin, you can't assume that just because you want to clear your own
handler that it's okay to clear all of them. It's even a dangerous
assumption to make when developing a page, unless you are familiar with the
internals of all the plugins you are using.

Then there is the classic ambiguity of .unload(). Does it call an onunload
handler, or does it unbind all onload handlers? There is no doubt with
.un(load) or .on(unload, fn) which are only a few characters longer. 

Don't worry, nobody is proposing changes that require a fire drill to fix.
There will be a plugin to provide all the 1.1 names and I suspect the
default build will include it for at least a few months to make the
transition easier.


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


Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Erik Beeson

I just tried it and it worked fine. My guess is you don't properly close
tags inside your table. Here's what I just did and it worked fine:

table border=1
   tr
   tdSome Data/td
   tda href=#Foo/a/td
   /tr
   tr
   tdSome Data 2/td
   tda href=#Foo/a/td
   /tr
/table

$(function() {
 $('table a').click(function() {
 $(this).ancestors('tr').hide();
 });
});


--Erik


On 11/27/06, Bruce MacKay [EMAIL PROTECTED] wrote:


 Thanks Erik,

Unfortunately your line of code hid all the rows in the table, including
the one that was clicked.  If I just wanted to hide the row that was
clicked, how would your line be altered?

Bruce



At 10:38 a.m. 28/11/2006, you wrote:

$(tr).hide() matches all tr tags and hides them. If you want to hide the
tr that contained the link that was clicked, you might try something like
this:

$(#tbl_assetList a).click(function(){$(this).ancestors(tr).hide()});

That will hide all the TR tags that are up the DOM tree from the clicked
link. That may have undesirable affects if you have nested tables, but that
could be worked around.

--Erik

On 11/27/06, *Bruce MacKay* [EMAIL PROTECTED] wrote:
 Hi folks,

I have a tabulated set of data (table id=tbl_assetList), with the last
column of each row providing a delete it link to the following function...

function fnDeleteNodeTransaction(ni,pi,ai){
$(#theIndicator3).show();
$(#tbl_assetList a).click(function(){$(tr).hide()});

$.get(scripts/ajax_ramosus_editor.asp?id=4pblID=+pi+iAssetID=+ai+nodeID=+ni,
function(responseText){

$(#currentAssetsTable).html(responseText).highlightFade({color:'yellow',speed:2000,iterator:'sinusoidal'});
$(#theIndicator3).hide();
});
}

 My attempt at hiding the deleted item's row (line 3)  is successful in
hiding the entire table for reasons that are not obvious to me, but I
suspect are clearly obvious to you.

I'd appreciate some illumination here.

Thanks,

Bruce

___
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] jQuery 1.1 API improvements (macros, events)

2006-11-27 Thread Dave Methvin
 The problem with removing all the helper methods is that
 some are very heavily used (especially val and click).
 While that may reduce jQuery's file size, it will increase
 the size of many plugins and pages that use jQuery.

I don't think it will increase plugins or user code by more than a few
characters:

 Old:   .click(fn)
 New:   .on(click, fn)

It also eliminates a line or two of runtime checks in the core code, since
the current name overloading has to be disambiguated (Is it setting click
handlers or triggering them?) on each call.

 Moving out of core may be a good idea if file size really is
 that important ...

It's not just a question of file size, but of namespace pollution,
consistency, and documentation complexity. 

 ...it would still be good if these (or at least the most
 used ones) were still part of the default download...

I have a feeling that the compat plugin will have to be part of the standard
1.2 distribution given how many people currently use things like .click()
and .val(). The long term goal is to remove and un-document them from the
core, making them eventually optional; plugin writers should not assume they
are part of the core because that will create a dependency on the compat
plugin and lead to bloat.

 $( div ).bind( click, function() {
   doClick();
 }, {amount: 1} );

It would be more layout-friendly if the function could be the last argument,
since there may be several lines of code in the bound function. The object
at the end gets lost in the code layout. You could check for
arguments.length and decide whether there was an object in the second
argument or not. I can live with either one though.

 $().bind(click, function(event, bindData, triggerData) { ... });

This one gets my vote. It saves the cost of extending the event object and
eliminates the risk of clobbering a name in the original event
object--although clobbering some original event properties could be
considered a feature I guess. Just a thought about triggerData: if the
trigger cutoff (amount above) is in there, what effect would it have if
the handler modifies that? (I'm just trying to separate intended from
unintended effects.)

 I wonder if it would help to extend [ css() and attr() ] to
 allow getting of multiple properties at once. A possible 
 implementation would accept an array of String and returns
 a key/value object, with the values of the array as the keys.

I proposed .attrs() but that was to solve a problem that got solved in
another way. Given the push to shrink and simplify the core, I'd wait until
we find a nail needing that hammer. :-)



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


Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Erik Beeson

Not if you have well formatted tables. There should be a TD between the A
and TR. You could do .parents('tr'), which is the same as ancestors.

Not to hijack this thread, but maybe someone who is more familiar could
share with us which function is preferred, parents or ancestors?

--Erik

On 11/27/06, Brandon Aaron [EMAIL PROTECTED] wrote:


On 11/27/06, Bruce MacKay [EMAIL PROTECTED] wrote:

  Thanks Erik,

  Unfortunately your line of code hid all the rows in the table,
including
 the one that was clicked.  If I just wanted to hide the row that was
 clicked, how would your line be altered?

You could try to just call .parent('tr') instead of ancestors.

--
Brandon Aaron

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

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


Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Corey Jewett
They're identical. John coded parents(), and then for semantic  
correctness and compatibility with XSLT added the ancestors() alias.

Corey


On Nov 27, 2006, at 2:26 PM, Erik Beeson wrote:

 Not if you have well formatted tables. There should be a TD between  
 the A and TR. You could do .parents('tr'), which is the same as  
 ancestors.

 Not to hijack this thread, but maybe someone who is more familiar  
 could share with us which function is preferred, parents or ancestors?

 --Erik

 On 11/27/06, Brandon Aaron [EMAIL PROTECTED] wrote: On  
 11/27/06, Bruce MacKay [EMAIL PROTECTED] wrote:
 
   Thanks Erik,
 
   Unfortunately your line of code hid all the rows in the table,  
 including
  the one that was clicked.  If I just wanted to hide the row that was
  clicked, how would your line be altered?

 You could try to just call .parent('tr') instead of ancestors.

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


Re: [jQuery] submit() not firing..help

2006-11-27 Thread Clodelio Delfino
Thanks Klaus, didn't notice the typo stuff...working now... c,)


Cheers,
cdelfino

Klaus Hartl wrote:
 Clodelio Delfino schrieb:
   
 Hi All,

 Im using jquery-latest-pack, just wondering why below code doesn't
 attached to submit button

 $(#frmLogin [EMAIL PROTECTED]'doLogin']).submit(function() {
 alert(Test, i was submitted...)
 }}

 tried doing  $(#frmLogin [EMAIL PROTECTED]'doLogin']).val() to see if the
 its the correct element, it worked but when submit() was attached ...it
 doesn't work.

 Need inputs if im doing right or maybe just missing something..thanks in
 advance...

 Cheers
 cdelfino
 

 Clodelio,

 the submit event is only available for form elements, I guess that's why 
 it isn't fired after attaching it to an input element.

 Try this instead (assuming #frmLogin is a form):

 $(#frmLogin).submit(function() {
  alert(Test, i, the form, was submitted...)
 });

 There was also a typo in the end: }} that should have given you a 
 syntax error but maybe that was only this mail.


 -- Klaus

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


   



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


Re: [jQuery] Hiding a row in a table

2006-11-27 Thread Bruce MacKay

Yes, of course you are correct.

I did think to check the table's tags for completeness, but my 
checking was not sufficiently thorough.


Sorry for the added imposition and thanks again for the help,

-- Bruce


At 11:14 a.m. 28/11/2006, you wrote:
I just tried it and it worked fine. My guess is you don't properly 
close tags inside your table. Here's what I just did and it worked fine:


table border=1
tr
tdSome Data/td
tda href=#Foo/a/td
/tr
tr
tdSome Data 2/td
tda href=#Foo/a/td
/tr
/table

$(function() {
  $('table a').click(function() {
  $(this).ancestors('tr').hide();
  });
});


--Erik


On 11/27/06, Bruce MacKay 
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:

Thanks Erik,

Unfortunately your line of code hid all the rows in the table, 
including the one that was clicked.  If I just wanted to hide the 
row that was clicked, how would your line be altered?


Bruce




At 10:38 a.m. 28/11/2006, you wrote:
$(tr).hide() matches all tr tags and hides them. If you want to 
hide the tr that contained the link that was clicked, you might try 
something like this:


$(#tbl_assetList a).click(function(){$(this).ancestors(tr).hide()});

That will hide all the TR tags that are up the DOM tree from the 
clicked link. That may have undesirable affects if you have nested 
tables, but that could be worked around.


--Erik

On 11/27/06, Bruce MacKay 
mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:

Hi folks,
I have a tabulated set of data (table id=tbl_assetList), with the 
last column of each row providing a delete it link to the 
following function...


function fnDeleteNodeTransaction(ni,pi,ai){
$(#theIndicator3).show();
$(#tbl_assetList a).click(function(){$(tr).hide()});

$.get(scripts/ajax_ramosus_editor.asp?id=4pblID=+pi+iAssetID=+ai+nodeID=+ni, 
function(responseText){


$(#currentAssetsTable).html(responseText).highlightFade({color:'yellow',speed:2000,iterator:'sinusoidal'}); 


$(#theIndicator3).hide();
});
}

My attempt at hiding the deleted item's row (line 3)  is successful 
in hiding the entire table for reasons that are not obvious to me, 
but I suspect are clearly obvious to you.

I'd appreciate some illumination here.
Thanks,
Bruce
___
jQuery mailing list
mailto:discuss@jquery.comdiscuss@jquery.com
http://jquery.com/discuss/



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


___
jQuery mailing list
mailto:discuss@jquery.comdiscuss@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] Lite build not working for plugins?

2006-11-27 Thread Mike Alsup
Anybody have the lite build working for plugins?  When I include
plugins in my lite build the javadocs are not stripped (but they are
from core).  The min and pack builds seem to work just fine.  lite.js
looks like it should work but it doesn't (for me).

Mike

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


[jQuery] Checkbox: Selecting all Previous

2006-11-27 Thread Glen Lipka

This might be a newbie question, but I am having trouble with it.

I have 4 checkboxes vertical

input type=checkboxlabelbox 1/labelbr /   input
type=checkboxlabelbox 1 and 2/labelbr /   input
type=checkboxlabelbox 1 and 2 and 3/labelbr / input
type=checkboxlabelbox 1 and 2 and 3 and 4/labelbr /

When I click one, I want to check the boxes of all the ones previous to it
(including it).  And uncheck all the boxes after it.

How would I structure the statement in jQuery to select?  I am trying to
avoid the FOR loop.

This gives me the last one.
var lastOne = $(#myForm [EMAIL PROTECTED]:checked:last);

Not sure how to use this.  I tried prev() but that didnt seem to work.

Thanks for the help,

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


Re: [jQuery] jQuery Grid

2006-11-27 Thread Alex Cook
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Alan Gutierrez

* Alan Gutierrez [EMAIL PROTECTED] [2006-11-21 20:50]:
 * Alan Gutierrez [EMAIL PROTECTED] [2006-11-21 13:28]:
  I've created a simple jQuery grid...
  
  http://kiloblog.com/2006/11/19/a-grid-in-jquery/
  
  Your thoughts are appreciated.

Hey neat... I was poking at doing something similar, but your code is
much cleaner then my late-night attempts.  I'll post some more detailed
comments once I've had a chance to play with it.  Thanks!

-ALEX

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


Re: [jQuery] Corners plugin not working reliably in Opera 9

2006-11-27 Thread Mike Alsup
I just figured out that Opera 9 thing.   For some reason Opera 9 seems
to want the link tag to come before the script tags.  It seems to be
loading the styles asynchronously and that is causing a problem for
the corner plugin (I think the styles are getting applied after we've
munged the dom).  If you move the link tag up then all is well and you
can go back to using $(document).ready().

Mike

On 11/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Thanks Mike

 I suspect its an issue of ordering between the application of css styles
 and the document.ready() function. As you say the event does fire
 reliably, but the effects are sometimes applied and sometimes not.

 Anyways, $(window).load(...) fixes this specific problem.

 --Jacob

  Sometimes it shows the blue background and the corners, sometimes not.
  Try
  reloading the document several times, to see the problem.
 
  Hmm, that does indeed seem to be a 'ready' problem, or more accurately
  an Opera 9 problem.  It works correctly in Opera 8.  And the ready
  event fires correctly in Opera 9 (confirmed with alert).  If I change
  $(document).ready(...) to $(window).load(...) or it I use setTimeout()
  then it works every time in Opera 9.  Weird.
 
  By the way, that's an older version of the corner plugin that you're
  using.  You can get the updated version here:
  http://methvin.com/jquery/jq-corner.js
 
  Mike
 
  ___
  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] Checkbox: Selecting all Previous

2006-11-27 Thread Alex Cook
I couldn't figure out to do it unless I added some form of ID to each
input field.  I'm not sure how one can get the place of an element
within a jQuery object, so this is how I approached your problem.

 

Tested in Win/FF2

 

form

input type=checkbox id=1labelbox 1/labelbr /   

input type=checkbox id=2labelbox 1 and 2/labelbr
/   

input type=checkbox id=3labelbox 1 and 2 and
3/labelbr / 

input type=checkbox id=4labelbox 1 and 2 and 3 and
4/labelbr /

/form

 

script

 

$(document).ready(

function () {

$([EMAIL PROTECTED]).each(

function () {

$(this).bind(

click,

function ()
{

 
$(this).siblings([EMAIL PROTECTED]).lt($(this).id()-1).each(

 
function () {

 
$(this).attr(

 
{

 
checked: 'true'

 
}

 
);

 
}

 
)

}

)

}

)

}

);

 

/script

 

The code can be cleaned up a bit, but I like making it verbose while
trying to figure things out so that's what you get.

 

If someone knows how to snag the place of an element within a jQuery
collection so that number can be passed to the lt() function I'd love to
hear it.

 

-ALEX

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Glen Lipka
Sent: Monday, November 27, 2006 4:27 PM
To: jQuery Discussion.
Subject: [jQuery] Checkbox: Selecting all Previous

 

This might be a newbie question, but I am having trouble with it.

 

I have 4 checkboxes vertical

 

input type=checkboxlabelbox 1/labelbr /   

input type=checkboxlabelbox 1 and 2/labelbr /   

input type=checkboxlabelbox 1 and 2 and 3/labelbr / 

input type=checkboxlabelbox 1 and 2 and 3 and 4/labelbr /

 

When I click one, I want to check the boxes of all the ones previous to
it (including it).  And uncheck all the boxes after it.

 

How would I structure the statement in jQuery to select?  I am trying to
avoid the FOR loop.

 

This gives me the last one.

var lastOne = $(#myForm [EMAIL PROTECTED]:checked:last);

 

Not sure how to use this.  I tried prev() but that didnt seem to work.

 

Thanks for the help,


Glen

 

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


Re: [jQuery] jQuery rejected by VirtualMart author

2006-11-27 Thread Erin Doak
My mistake. You're correct.

Erin

On Friday, November 24, 2006 8:53 AM Erin Doak  said:

 I'm relatively new to jQuery but am excited about using it. I
 recently posted a request to have the jQuery library added to the
 list of libraries supported natively by VirtualMart, a Joomla
 ecommerce component. The author of VirtualMart has rejected the
 request:

It's called VirtueMart not VirtualMart.



Chris.

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


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


Re: [jQuery] Corners plugin not working reliably in Opera 9

2006-11-27 Thread jyl
Thats bizarre :) But thanks!

--Jacob

 I just figured out that Opera 9 thing.   For some reason Opera 9 seems
 to want the link tag to come before the script tags.  It seems to be
 loading the styles asynchronously and that is causing a problem for
 the corner plugin (I think the styles are getting applied after we've
 munged the dom).  If you move the link tag up then all is well and you
 can go back to using $(document).ready().

 Mike

 On 11/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Thanks Mike

 I suspect its an issue of ordering between the application of css styles
 and the document.ready() function. As you say the event does fire
 reliably, but the effects are sometimes applied and sometimes not.

 Anyways, $(window).load(...) fixes this specific problem.

 --Jacob

  Sometimes it shows the blue background and the corners, sometimes
 not.
  Try
  reloading the document several times, to see the problem.
 
  Hmm, that does indeed seem to be a 'ready' problem, or more accurately
  an Opera 9 problem.  It works correctly in Opera 8.  And the ready
  event fires correctly in Opera 9 (confirmed with alert).  If I change
  $(document).ready(...) to $(window).load(...) or it I use setTimeout()
  then it works every time in Opera 9.  Weird.
 
  By the way, that's an older version of the corner plugin that you're
  using.  You can get the updated version here:
  http://methvin.com/jquery/jq-corner.js
 
  Mike
 
  ___
  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] Checkbox: Selecting all Previous

2006-11-27 Thread dave.methvin


Glen Lipka wrote:
 
 I have 4 checkboxes vertical
 
 input type=checkboxlabelbox 1/labelbr /   input
 type=checkboxlabelbox 1 and 2/labelbr /   input
 type=checkboxlabelbox 1 and 2 and 3/labelbr / input
 type=checkboxlabelbox 1 and 2 and 3 and 4/labelbr /
 
 When I click one, I want to check the boxes of all the ones previous to it
 (including it).  And uncheck all the boxes after it.
 
I thought about an approach that checked all the boxes then cleared the ones
following the checked one by using selectors and DOM navigation, but I think
it's much simpler to do an each() instead. 

$(document).ready(function(){
  $(#myform checkbox).bind(click, function(){
var mybox = this;
var tick = true;
$(myform checkbox).each(function(){
  this.checked = tick;
  if ( this == mybox )
tick = false;
});
  });
});
-- 
View this message in context: 
http://www.nabble.com/Checkbox%3A-Selecting-all-Previous-tf2715371.html#a7572127
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Reading comments from the dom.

2006-11-27 Thread Paul McLanahan
Could be a cool addition to the metadata plugin. It's more semantic in
my opinion to have the meta data in a script tag if you don't wan it
directly attached to a dom element, but it would be cool nonetheless.

On 11/27/06, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:
 Although we rarely want to pay any attention (programmatically) to the
 comments in the html, I thought it would be cool to read them in jquery.

 They are in the dom, obj.nodeType == COMMENT_NODE. But jquery just skips
 over that node type.

 I could imagine doing $('a').prevComments() or $('a').nextComments() or
 $('a').Comments()

 A plugin could drop down to simple dom navigation to get the info and then
 return the text.

 Has anyone done this? Does it sound useful to anyone?

 --
 Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/



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


Re: [jQuery] Reading comments from the dom.

2006-11-27 Thread Ⓙⓐⓚⓔ

I'm glad you noticed the connection... I was working on some script tag
stuff in Safari, it tries to run just about any script type! the json
scripts won't impact much, as the result will be discarded, but a long bit
of code gets executed at page load time. hardly what I wanted.

so before anyone tries json script tags, let it be known that safari
misbehaves!

On 11/27/06, Paul McLanahan [EMAIL PROTECTED] wrote:


Could be a cool addition to the metadata plugin. It's more semantic in
my opinion to have the meta data in a script tag if you don't wan it
directly attached to a dom element, but it would be cool nonetheless.

On 11/27/06, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:
 Although we rarely want to pay any attention (programmatically) to the
 comments in the html, I thought it would be cool to read them in jquery.

 They are in the dom, obj.nodeType == COMMENT_NODE. But jquery just skips
 over that node type.

 I could imagine doing $('a').prevComments() or $('a').nextComments() or
 $('a').Comments()

 A plugin could drop down to simple dom navigation to get the info and
then
 return the text.

 Has anyone done this? Does it sound useful to anyone?

 --
 Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
 ___
 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] Feature Request for $(expr, context)

2006-11-27 Thread Jörn Zaefferer
Mathias Bank schrieb:
 Thanks for your answers. This helps.

 But I think, that the feature request is still interesting, because it
 makes using jQuery more consistent. With this behaviour, it doesn't
 matter, if I have an element in DOM or I have just an element in
 memory.
   
Right, if $(html).find(li) is possible, there is no reason why $(li, 
html) shouldn't work as well.
I created a bug report for this matter: http://jquery.com/dev/bugs/bug/443/

-- 
Jörn Zaefferer

http://bassistance.de


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


[jQuery] scripting iframes with jquery

2006-11-27 Thread Jed Hurt

I found a technique at http://www.dyn-web.com/dhtml/iframes/height.html for
automatically resizing an iframe to be the height of the document it
contains. Unfortunately, the javascript used to achieve the effect is not
cross-browser compatible. How could one achieve the same effect using
jQuery?
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/