Re: [jQuery] release: Validation plugin beta 1

2007-03-07 Thread Fil
> Since jQuery 1.1.2, there are no more browser
> issues with that format. Whether you use it or not is your choice, the
> recommended alternative is settings validation rules via plugin options.

I *will* use it, that's why I asked these questions :)  Glad to see
they have already been thought through.

-- Fil

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


Re: [jQuery] release: Validation plugin beta 1

2007-03-07 Thread Fil
> http://bassistance.de/jquery-plugins/jquery-plugin-validation/

Oh it's great.

I wonder though if your choice of writing class="{x:y;z:t}" is not
potentially problematic.

As I see it:
- it could be incompatible with CSS2.1 selectors
- it is probably incompatible with jQuery selectors
- it is *certainly* going to confuse a few users
- it might confuse some browsers (though I guess you've tested this)

An alternative would be to write something like
class="DEF-x-y_z-t"

(but I admit it's much uglier)   :)

-- Fil

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


[jQuery] :checked and [EMAIL PROTECTED]

2007-03-03 Thread Fil

hello people


$("[EMAIL PROTECTED]") is obsolete and replaced by  E:checked isn't  it?

I ask because http://docs.jquery.com/DOM/Traversing/Selectors still mentions
[EMAIL PROTECTED] in an example

-- Fil


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


Re: [jQuery] jQuery 1.1.2

2007-03-01 Thread Fil
@  <[EMAIL PROTECTED]> :
> Fil, did you ever get a definition of "DOM 0 expandos"...

Now I got plenty, thanks :)

-- Fil


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


Re: [jQuery] jQuery 1.1.2

2007-02-28 Thread Fil
> * Changed: Events are now internally stored in elem.$events rather
> than elem.events (due to a nasty bug relating to DOM 0 expandos).

I'm translating this blog into French, but I can't figure how to translate
this sentence. "DOM 0 expandos" ?

Anyway this is available at http://www.jquery.info/spip.php?article42

-- Fil


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


Re: [jQuery] Google's Summer of Code

2007-02-16 Thread Fil
> Some examples of good ideas (which should be expanded upon):
>  - Add jQuery support to a popular CMS/Framework

Or, a less popular one, like SPIP ;-)

And, would it make sense to have a "jquery extension" for firefox,
implemented in C instead of javascript? Just to see how fast a browser could
go (on the css/xpath selectors especially)?

-- Fil


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


Re: [jQuery] ISO 8859-1 encoding

2007-02-05 Thread Fil
@ Jon Ege Ronnenberg <[EMAIL PROTECTED]> :
> I bow for you. You're absolutely right and utf8_decode() was just what I
> needed! Still I don't get why setting charset to UTF-8 doesn't show the
> danish characters correct in a web page then.

It's not something obvious; I wrote an entire article explaining this (but
it's in French) at http://www.uzine.net/article1785.html

in short if your page uses utf-8, it should advertise it in the server
response headers (e.g., in php:
header('Content-Type: text/html; charset=utf-8');
) and/or as a meta http-equiv inside the  of your html page:


This is because for most browsers the default charset for web pages (when
they don't advertise which charset they use) is iso-latin. In that case your
danish characters (encoded on two bytes, b1, b2) will look as two iso-latin
characters ("b1" then "b2", which is displayed on screen like "Ä^@") instead
of one two-byte character ("b1b2", displayed as you want it to be).

hope this helps

-- Fil


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


Re: [jQuery] ISO 8859-1 encoding

2007-02-05 Thread Fil
> What do you mean the by UTF-8 contains all characters?

utf-8 is an encoding for unicode characters, see
http://da.wikipedia.org/wiki/UTF-8
http://da.wikipedia.org/wiki/Unicode

The unicode norm contains all characters that exist in all languages known
to humanity.

> UTF-8 does not contain the danish letter æ,ø, and å. ISO 8859-1 does.

Yes it does, but they are not encoded the same way. In iso-latin, a few
accentuated characters exist, and are encoded on a single byte. In UTF8
these will be represented by two bytes.

> Anyway I usually develop apps with .NET but this particular projects is in
> PHP and I haven't seen any functions to iso encode with but I think I'll
> write my own little function. That seems to be the only way.

You can probably use utf8_decode(), see
http://www.php.net/manual/da/function.utf8-decode.php

-- Fil


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


Re: [jQuery] ISO 8859-1 encoding

2007-02-05 Thread Fil
@ Jon Ege Ronnenberg <[EMAIL PROTECTED]> :
> Hi guys!

and girls too !

> I need to handle danish characters which can be found in the iso 8859-1
> specifications but jQuery use encodeURIComponent which always encode to
> UTF-8 (doesn't contain the danish characters).

On the contrary UTF-8 *does* contain all characters. And using
encodeURIComponent() is the only consistentway of passing accentuated data
in XHR.

What you need to do (if you can do it, that is) is to re-encode your data
into ISO-latin, server-side, when it arrives.

If you cannot do it, then you might try escape instead of
encodeURIComponent, but you'll need to test it everywhere.

-- Fil


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


Re: [jQuery] multi language support

2007-01-30 Thread Fil
Salut Alexandre

tu peux rejoindre la liste [EMAIL PROTECTED] (mailto:
[EMAIL PROTECTED]) car justement on en parle :)


@ Alexandre Plennevaux <[EMAIL PROTECTED]> :
> I will gladly translate the doc into French! 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of John Resig
> Sent: mardi 30 janvier 2007 3:57
> To: jQuery Discussion.
> Subject: Re: [jQuery] multi language support
> 
> We're currently trying to figure out what the best way to achieve this goal
> would be - but it's definitely a huge concern for us.
> 
> Having an easy-to-use, automated, system would be imperative (especially
> when used in conjunction with the wiki).
> 
> We'll be sure to announce a request for help translating when we've got a
> system ready-to-go. Thanks for your offer!
> 
> --John
> 
> On 1/29/07, Marc Jansen <[EMAIL PROTECTED]> wrote:
> > Hi list,
> >
> > I have been more or less silent these last days, but one idea just 
> > struck me. I don't even know if this has been discussed already...
> >
> > How about having multi language documentation / wiki etc.? I could 
> > help in translating English to German (at least Jörg and Klaus surely 
> > could help, I guess)... even though my language (and JavaScript ;-)) 
> > skills are limited and I'm somehow very busy -- at least until Feb. 28th.
> >
> > What Do you think?
> >
> > ___
> > jQuery mailing list
> > discuss@jquery.com
> > http://jquery.com/discuss/
> >
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> -- 
> Ce message Envoi est certifié sans virus connu.
> Analyse effectuée par AVG.
> Version: 7.5.441 / Base de données virus: 268.17.14/658 - Date: 29/01/2007
> 14:49
>  
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

-- Fil


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


Re: [jQuery] ANNOUNCE: jQuery API Browser

2007-01-29 Thread Fil
> > the blue flash on api-browser is killing my eyes, especially in the grey
> > zones. And the tooltip is weird, it goes "under" the pane scrollbar
> >   
> Okok, I'll remove that flash on the entire method. How about reducing it 
> to the method header (the first line)?

Yep, limiting it to the header and chosing a less agressive contrast would
probably do.

-- Fil


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


Re: [jQuery] ANNOUNCE: jQuery API Browser

2007-01-29 Thread Fil
> jQuery API Browser:

two small remarks (other than this, the page is great to use):

the blue flash on api-browser is killing my eyes, especially in the grey
zones. And the tooltip is weird, it goes "under" the pane scrollbar


And, by the way, do you have an idea how we could we translate this? As the
docs are generated from the original (source) scripts, my idea would be to
maintain our own "fake" version of the scripts (keeping only the comments),
in each language. But where? And, has anyone got a better idea?

-- Fil


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


Re: [jQuery] jQuery French chapter / groupe francophone jQuery

2007-01-25 Thread Fil

Salut

je viens de créer la liste de discussion [EMAIL PROTECTED] pour tous ceux
qui souhaitent parler de jQuery, en français. A bientôt !

Pour s'inscrire il suffit d'envoyer un email à l'adresse
[EMAIL PROTECTED]

ou se rendre à http://listes.rezo.net/mailman/listinfo/jquery-fr

à bientôt


(in English: I've just created the [EMAIL PROTECTED] mailing-list)

-- Fil


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


Re: [jQuery] What tools should I use to troubleshoot jquery problems? (John Resig, jquery team, other gurus please share your tricks...)

2007-01-24 Thread Fil
> >> http://bassistance.de/2007/01/23/unobtrusive-clear-searchfield-on-focus/
> > http://jquery.com/discuss/2007-January/022164/

Why not use .one()?

$('#searchbox')
.one('focus',
function() {
$(this).attr('value','');
}
)

This is what I did for http://www.monde-diplomatique.fr/

This way you can search for "search" :)

-- Fil


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


Re: [jQuery] Detect browser close event

2007-01-19 Thread Fil
> > I want to attach an event on close to verify that all changes made
> > on a form are saved.

We are doing thins with jquery .unload() and it works. We don't stop people
from leaving, but just ask, before, if they wish to submit unsaved changes
(and save them with a .load() if they answer "OK").

The code is quite complex, because it's doing lots of things, but hey, it's
free
http://zone.spip.org/trac/spip-zone/browser/_plugins_/_stable_/crayons/javascript/crayons.js

300 jQuery(window).unload(function(e) {
301   var chg = jQuery(".crayon-changed");
302   if (chg.length && uniConfirm(configCrayons.txt.sauvegarder)) {
303 chg.next().find('form').submit();
304   }
305 });

uniConfirm() is just a unicode-safe version of confirm()
jQuery(".crayon-changed") is the list of unsaved items, and their associated
forms are jQuery(".crayon-changed").next()

-- Fil


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


Re: [jQuery] AJAX-filled div broken after 1.04 -> 1.1 update

2007-01-19 Thread Fil
> Hi everyone. After wrestling with this one for awhile I've come to  
> the conclusion that I need your help. For your reference, here are  

This bug is solved in SVN and in the forthcoming jQuery 1.1.1

If you must correct it now you can build it from SVN (it's easy); or just
be lazy and pick up a corrected version at this site (for example):
http://www.spip.net/dist/javascript/jquery-1.1.js

-- Fil


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


Re: [jQuery] jQuery French chapter / groupe francophone jQuery

2007-01-18 Thread Fil
> Although most of the international jquery community speaks and writes
> English...

The "community-building" is just beginning, and (among other things) adding
a few international chapters will make it grow.

Anyway my question was not about whether this ought to exist (two people are
enough to start a list), but about whether jquery.com wants to host it.

> there are juniors out there who may only speak javascript.

LOL. And a few grown-ups who still prefer to read and express themselves in
their own language.

> I think it's a wonderful idea... part of the plan to take over the
> world... you know! :)

That's exactly the point. Are we building this on the official server or
spreading it all over? I have my own mailing-list server, so it's not a
technical problem, just an organizational choice.

-- Fil


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


[jQuery] jQuery French chapter / groupe francophone jQuery

2007-01-18 Thread Fil
Hello,

I propose the creation of a French chapter of this discuss- list; would
jquery.com host the list?

Je propose la création d'une liste francophone de discussion à propos de
jQuery, afin d'avoir un espace pour nos [EMAIL PROTECTED] qui ne parlent pas
anglais.

-- Fil


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


Re: [jQuery] 1.1 Load

2007-01-18 Thread Fil
> I updated to 1.1 a couple of days ago and now all my load statements
> ( eg: $("#selector").load(url, {"stuff":"stuff"}, function() {alert("more
> stuff")}); )
> have stopped working.

This has been fixed in SVN. You can either download and build it (via svn co
+ make) or wait for next Monday when jQuery 1.1.1 is released.

-- Fil


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


Re: [jQuery] Proper OOP paradigm / please be friendly

2007-01-17 Thread Fil
> Math.random for logic is flawed.

Hello human being,

as you probably have noticed, there is an abysmal proportion of 1% of women
in Open Source (compared to 10% in commercial software development). We need
to think about how we communicate if we want to help this change.

Please be friendly and try not to antagonize people who could be willing to
participate, but might be tempted to exit if this community appears to be
another part of the great macho internet.

(I can provide references if you wish, but you can google "debian women" or
"flosspols" to find them by yourself.)

-- Fil


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


Re: [jQuery] "THE" List of Sites Using jQuery

2007-01-17 Thread Fil
> > http://docs.jquery.com/Sites_Using_jQuery
> I can read, edit, but not save the page :(

Finally it worked, sorry.

-- Fil


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


Re: [jQuery] "THE" List of Sites Using jQuery

2007-01-17 Thread Fil
> http://docs.jquery.com/Sites_Using_jQuery

I can read, edit, but not save the page :(

I wanted to add this in the second section, after Drupal and before trac (if
it's alphabetical order):

SPIP – A multilingual open source Web publishing system
http://www.spip.net/

thanks

-- Fil


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


Re: [jQuery] packing or mod_gzip (or both)

2007-01-17 Thread Fil
> * uncompression done by the js engine at each page (~150ms per page, some
>   tests say)

Here's a test: http://fil.rezo.net/unpack_speed.html

Surprise: on my machine, Safari unpacks seemingly faster than FF2.

-- Fil


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


[jQuery] packing or mod_gzip (or both)

2007-01-16 Thread Fil
Hello,

as we discussed with Jörn on irc, comparing the merits of the packed vs
mod_gzip versions of jquery, here's a quick comparison:


The file size determines the time necessary to download; with mod_gzip the
time is reduced in proportion:

147460 jquery.src.js
 57169 jquery.lite.js
 37982 jquery.compressor.js
 36062 jquery.src.js.gz
 20342 jquery.pack.js
 18002 jquery.lite.js.gz
 11821 jquery.compressor.js.gz
 10426 jquery.pack.js.gz


The 'compressor' version was obtained by running jquery.lite.js through the
javascriptcompressor.php class (plus re-adding the copyright header).

So, the compressor file itself is not very good compared to the pack.js
file. However with mod_gzip turned on, they are roughly equivalent.


Then, to further compare:

.pack
-
CONS:
* deep code obfuscation
* uncompression done by the js engine at each page (~150ms per page, some
  tests say)

PROS:
* portable (doesn't need to install mod_gzip to have the best download time)


.compressor
---
CONS:
* needs mod_gzip to get as small, otherwise is 70% larger (hence 70% longer
  to download)
* might bork on older MSIE (which ones I don't know).

PROS:
* mild obfuscation (the debugger can work, better than with .pack)
* the code is uncompressed at the browser/OS level, once (instant)
* the uncompressed code is cached (gains 150ms at each hit)


* * *

My preference (for my own uses) is to go with jquery.compressor.js +
mod_gzip. YMMV, of course. But maybe we should provide an "official
.compressor version" for, well, people like me?


-- Fil


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


[jQuery] jQuery 1.1 migration, traduction fran çaise (French translation)

2007-01-12 Thread Fil

Hi, I just translated John's blogs about 1.1 into French.

Salut je viens de traduire les blogs de John à propos de la version 1.1

http://www.jquery.info/spip.php?article30


-- Fil


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


Re: [jQuery] php frameworks

2006-12-05 Thread Fil

I would mention SPIP, which now includes jquery in it dev version (used at
www.monde-diplomatique.fr)

Of course it's ZE BEST software. You can trust me on this, as I'm one of its
immodest developers ;)

http://www.spip.net/

Unfortunately it's not well known in the English-speaking community. But
it's very strong in France and Spain, and is doing well in Latin America, it
seems. Very few in Germany, as typo3 holds the "market" :)

-- Fil


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


Re: [jQuery] a new website with jQuery

2006-12-01 Thread Fil
@ Olivier Percebois-Garve <[EMAIL PROTECTED]> :
> The new design is great. Very readable. I noticed that you are using a 
> non-compressed version a jquery...

It's compressed server-side with mod_gzip, no need to slow down the client

-- Fil


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


[jQuery] a new website with jQuery

2006-12-01 Thread Fil

or, a rather old website (founded circa 1994) that has launched a new
version, jquery-ed. http://www.monde-diplomatique.fr/

thanks John, Jörn and all

jQuery is credited @ http://www.monde-diplomatique.fr/diplo/logiciels/

-- Fil


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


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil
@ Brandon Aaron <[EMAIL PROTECTED]> :
> Bug report: http://jquery.com/dev/bugs/bug/446/

Thanks for being so fast Brandon :)

-- Fil


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


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil

I agree, but it's really grep that we want to do here, in my opinion.
Either way, it will be fixed :)

Someone mentioned .filter(".one,.two"), but it has exactly the same bug.


@ Andrea Ercolino <[EMAIL PROTECTED]> :
> 
> the fix is much simpler:
> 
> t.constructor == Array &&
> jQuery.map(this,function(a){
>   for ( var i = 0; i < t.length; i++ )
>   if ( jQuery.filter(t[i],[a]).r.length )
>   return a;
> - return false;
> + return null;
> }) ||
> 
> I've tested with coreTest.js and your example and it works.
> 
> -- 
> View this message in context: 
> http://www.nabble.com/.filter%28array%29-bug%2C-and-patch-tf2718768.html#a7582383
> Sent from the JQuery mailing list archive at Nabble.com.
> 
> 
> ___
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/

-- Fil


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


Re: [jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil
> however the bug is only visible in a complex script, and within th Firebug
> Inspector (but I can assure you it breaks my script), and I was not able to
> write a simple test... so you might prefer to ignore me :)

OK, Bertrand (a.k.a. Toggg) has found a simple test case:


http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";>

jQuery filter test
http://jquery.com/src/jquery-latest.js"</a>; 
type="text/javascript">


$(function() {
$("h1").filter([".one", ".three"]).css("background", "red");
});




class one
class two
class three
gives 
Error: elem has no properties
Source File: http://jquery.com/src/jquery-latest.js
Line: 721




So this is in the case an element of $("h1") does not match any selector.

The same error appears if you change the selector to:

$("h1").filter([".one", ".nomatch"]).css("background", "red");   

Now, it breaks when a selector does not match any element of $("h1").

In both cases the patch clears the issue

-- Fil


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


[jQuery] .filter(array) bug, and patch

2006-11-28 Thread Fil

Hello,

I've encountered a bug in .filter(array)

however the bug is only visible in a complex script, and within th Firebug
Inspector (but I can assure you it breaks my script), and I was not able to
write a simple test... so you might prefer to ignore me :)

I can provide the complex test if absolutely needed, but it will need more work
than just testing this patch against the test suite, I guess.


In any case, here is the patch:

filter: function(t) {
return this.pushStack(
t.constructor == Array &&
-   jQuery.map(this,function(a){
+   jQuery.grep(this,function(a){
for ( var i = 0; i < t.length; i++ )
if ( jQuery.filter(t[i],[a]).r.length )
-   return a;
+   return true;
return false;
}) ||




The idea of a .filter() is to remove nodes that don't match, not to insert
'false' instead. In my tests, when I use Firebug I clearly see that the
object I receive is something like the (crazy) following:

length: 1
0: node0
1: false
2: node2


-- Fil


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


Re: [jQuery] Testsuite 2.0

2006-11-19 Thread Fil
> The suite finally runs in Safari! Awesome job Joern.

Yes. But at my first run it crashed Safari. Second try it failed on tests 13
14 39 55 59 (Tests completed in 10252 milliseconds. 9 tests of 280 failed.)
Do you need the details?

BTW the output is superb. I just realized you can open each section to see
which tests exactly have failed.

-- Fil


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


Re: [jQuery] Which CMS / Wiki jQuery.com is using

2006-11-15 Thread Fil
> If you are looking for a CMS that is powered by jQuery, Drupal version
> 5 (currently in Beta) is using jQuery as it's core JS library, and is
> integrating it into the main API.

Same story for SPIP : the next version will be fully jquery-aware.

-- Fil


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


[jQuery] slideDown() incomplete

2006-10-12 Thread Fil
A weird thing on
http://blog.mondediplo.net/2006-09-02-Tous-unis-contre-le-fascisme-islamique

I have a script that opens the "archives / date" blocks when one clicks on
the date.

If I use 
.slideDown('slow');

it doesn't slide down 100%, and stops at about 90% (on FF/Mac). I have to do
this to have it in full:

.slideDown('slow', function(){
$(this).height('');
});

And of course I don't like the idea.

The "show selection source" menu in FF tells me that the buggy code is:

  août 2006
 
Terrorisme

...

Any idea?  (jquery-1.0.2)

-- Fil


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


Re: [jQuery] meat, was: form plugin updates

2006-10-12 Thread Fil
> Splitting the code base could make it easier to identify code that is
> independent of certain other chunks.

What could help would be a server-side script to which you pass the list of
plugins you want, and that returns it (with proper caching info server- and
client- side).

I'm thinking jquery.php?modules=core,forms,sha,bang,foo,bar&pack=yo!

-- Fil


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


[jQuery] jQuery Magazine #1 "FR"

2006-10-10 Thread Fil

Hello--bonjour!

jQuery Magazine #1 vient d'être traduit en français
jQuery Magazine #1 has just been translated into French

http://www.jquery.info/spip.php?article20

Many thanks to Leah who accepted to redo the page layout
Merci à Leah qui a accepté de refaire la mise en page

with the translations made by Allergie, BoOz, cy_altern, Fil & toggg
à partir des traductions de Allergie, BoOz, cy_altern, Fil et toggg

vive jQuery! viva!

-- Fil


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


Re: [jQuery] Is there a way to "endAll()"?

2006-10-09 Thread Fil
> > I do it this way:
> > 
> > $.fn.plugin = function() {
> > this.find().filter().parent().siblings();
> > return this;
> > }
> 
> That would return the modified jQuery object.

Oh my goddess!  Thanks for correcting this :-/
I need to proof my code now...

-- Fil


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


Re: [jQuery] Is there a way to "endAll()"?

2006-10-09 Thread Fil
@ Jacky <[EMAIL PROTECTED]> :
> After some find(), filter(), parent(), siblings()...,
> is there any convenient way to end() back to the original $("xxx")?
> This would be good for plugins to return the original jQuery object.

I do it this way:

$.fn.plugin = function() {
this.find().filter().parent().siblings();
        return this;
}

-- Fil


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


[jQuery] pack speed

2006-10-09 Thread Fil
Hello,

has anyone measured the speed of unpacking jquery (or any other script, for
that matter)?

I would suspect that uncompressing/executing jquery.pack.js generates a
small time overhead, but how long does it take? Compared to the time
overhead of downloading the full-size jquery.js?

-- Fil


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


Re: [jQuery] jQuery 1.0.2 RC2

2006-10-08 Thread Fil
> Testsuite: http://joern.jquery.com/test/

Hi Jörn,

on this page Safari crashes before it has a chance to display anything!

-- Fil


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


Re: [jQuery] Plugin Rewrite: Accordion

2006-10-05 Thread Fil
> > John Resig himself:
> > http://jquery.com/discuss/2006-August/010451/
> 
> Ah, yes. Don't know how I missed that.

I guess almost everyone is overwhelmed by this mailing-list :(

> Would be great to see that added to core. John, is that still in the  
> works? Any ETA?

I can't answer this, however I think that using the bug/feature tracking
system will be more productive.

First check existing tickets
http://jquery.com/dev/bugs/

Then create a new ticket
http://jquery.com/dev/bugs/new/

-- Fil


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


Re: [jQuery] Plugin Rewrite: Accordion

2006-10-05 Thread Fil
> I know this was brought up before in another thread, but I don't  
> think anyone satisfactorily answered it. Is there a way to find  
> multiple  tags for a given  to slideUp/slideDown?
>  .../...
> Anyone else have any ideas on this?

John Resig himself:
http://jquery.com/discuss/2006-August/010451/
(then he got sick)

-- Fil


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


Re: [jQuery] Plugin Rewrite: Accordion

2006-10-05 Thread Fil
> The behaviour should be exactly the same as the original.

It sure works fine in Safari

> Is this worthy to put it in the jQuery plugin repository?

I have a question about this: is there (any plans to) an open SVN repository
for jQuery plugins? I'd hate to pollute the main development repo with my
buggy plugin projects :D -- but something's clearly missing here, as we're
unable to really cooperate on the same files and instead must each have a
set of scripts on one's servers.

If this is any indication, we have opened such a project for SPIP, called
"the SPIP Zone", and now have around 100 commiters, with no conflict as code
is always progressing (or forked when "visions" differ). The only base for
participation is accepting a "Charter" that basically says that everything
we do there is free software around SPIP, for the common good, with no
advertising/self-promotion.

-- Fil


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


Re: [jQuery] Spread jQuery Request

2006-09-28 Thread Fil
> Yes. I see now. Unfortunately, as Klaus said, jQuery no longer has this edge
> as other developers have cottoned on to this.

Why "unfortunately"? A great concept was invented here, and that's *very*
fortunate. Thank you John, be proud :)

-- Fil


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


Re: [jQuery] Magazine Typo corrections

2006-09-26 Thread Fil
> Guess what? I'm a pretty strong feminist myself. The constant use of the
> Devo hat throughout the magazine should provide a clue that the three-tiered
> object is some kind of jQuery icon.

Yeah, I had figured this :)  The misunderstanding came from the fact that I
had never seen the DEVO logo before (and didn't know what DEVO was until I
googled it).

-- Fil


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


Re: [jQuery] Magazine Typo corrections

2006-09-26 Thread Fil
> I agree though! When it comes to HTML in sample code, it's always good to
> have it XHTML standards compliant. That way, people won't complain that your
> code won't validate.

The problem is not those who "complain", it's the image you project around.

When you read something about a new and exciting javascript library, and you
find something that upsets you (be it a girl on page 12 with no explanation
of why it should be funny [as opposed to sexist], or non-compliant XHTML in
the examples, or people using harsh words on the mailing-lists), you tend to
stay away.

Because you start suspecting that it's not as perfect at advertised, or
because it gives you the impression that this is going to be yet-another
big-boys women-unfriendly community.

Some people in Debian has worked a lot on these issues, under the "Debian
women" title (though it's not restricted to women's issues: a friendly
community is friendly to all, if just only to timids).

w/o further developing, I invite you to read
http://www.tldp.org/HOWTO/Encourage-Women-Linux-HOWTO/

-- Fil


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


Re: [jQuery] Magazine Typo corrections

2006-09-26 Thread Fil
> I, for one, was quite pleased with the corrections, and may call on some of
> the list members who made corrections to proofread the magazine in future
> issues. Anyone interested?

yep, me too

-- Fil


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


Re: [jQuery] Logging for development?

2006-09-26 Thread Fil
> I'm not sure if this overhead should be removed, eg. by the build script
> when packing the code.

I'd favor a three file organization: a full-debug jquery-debug.js (that
includes the Logging object, a logging interface and so on); a normal
jquery.js; and a packed jquery-packed.js

-- Fil


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


Re: [jQuery] Magazine Typo corrections

2006-09-26 Thread Fil
> Are you saying that there should be a section on jQuery set aside for womens
> issues?

Did I say such a thing?  :-D

I just point to the fact that using invalid XHTML will discourage *some*
XHTML-savvy users, as putting a bimbo picture on the Magazine (p 12) -- with
no explanation whatsoever of the DEVO-stuff -- will discourage *some* women
(and maybe some "rabid feminists" as myself, lol).

I mentioned Debian-women because they have produced interesting work on
these issues, and invited you to read one of these articles. I don't claim
that jQuery should have a jQuery-women project!


> Internationalisation is another thing entirely however. There's clearly the
> desire for jQuery to be translated, but maybe not those with the time,
> experience and general knowhow.

We have already actively started to translate the Magazine in French  ;-)


> If everyone who saw something offensive stayed away, youtube would a
> failure, newsgroups would never have exploded, and slashdot would be empty
> (apart from Wil Wheaton submitting odd articles about his time on Star
> Trek!).

Of course, trash TV works too. Our point here is to try and make things
better. I think we all agree on this, and I'm getting back to my translation
of the docs.

-- Fil


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


Re: [jQuery] Ajaxian Framework Results

2006-09-25 Thread Fil
> > jQuery is only, what, one month old?
> 
> Try thirteen months! :) It moved from beta to stable last month, but it has
> been around for over a year now.

Yes I know that. But the official release is only one month old.

-- Fil


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


Re: [jQuery] Ajaxian Framework Results

2006-09-25 Thread Fil
@ Yehuda Katz <[EMAIL PROTECTED]> :
> This just shows that we need to do something to push up the profile of
> jQuery. We're obviously making progress, but Prototype and Scriptaculous are
> the king and queen at the moment.

I'm not sure it stays like this for long. jQuery is only, what, one month
old? And it's already integrated as a standard feature in Drupal & SPIP...

The motto will be "I never liked javascript, until I met jQuery".

-- Fil


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


Re: [jQuery] Form plugin - move to core?

2006-09-24 Thread Fil
> My personal preference would be to move the form plugin methods into
> core, remove core's existing serialize method and introduce a
> "serializeToString" (or something like that) that has a string return
> type in the form of "name=value&name=value".  All this would increase
> the size of core, but only by 2k before packing.
> 
> I'd love to hear opinions on this.

For what it's worth, we have just integrated jQuery into SPIP as a standard
feature (yes!), and the file contains jquery+form, packed.

-- Fil


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


Re: [jQuery] Google map plugin idea

2006-09-23 Thread Fil
@ Dylan Verheul <[EMAIL PROTECTED]> :
> OK, no idea if this is what you'relooking for, but I added something:
> http://www.dyve.net/jquery?googlemaps
> The markers can now be provided in geo microformat.

Yes it looks good! Thanks.

-- Fil


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


Re: [jQuery] Visual jQuery Magazine

2006-09-22 Thread Fil
> The release of the first issue of the Visual jQuery Magazine is official.

Yes!  And it looks good ;-)

Is it possible to have a "source" file in order to translate the magazine
"in-place"?

BTW, unfortunately, the example on page 5 in invalid XHTML, with a
collection of "p"s inside a "a". Same remark page 8 with a  inside a
.

Otherwise, kudos for the main article on the jQuery object, it's going to be
really useful

-- Fil


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


Re: [jQuery] Google map plugin idea

2006-09-22 Thread Fil
> > > I don't think a casual HTML writer is going to use the geo
> > > microformat. It's small, but you have to write a lot of HTML to
> > > describe a very small piece of information.

Well it's not *that* complex, and it has strong grounds, based in real-world
examples (at least that's how they're meant to be designed).
If you write tools that help people do great stuff, they will learn the
"language", whatever it is.

But there's a more important argument. microformats are carefully-thought
proposals for writing conventions. If people adopt them (and I advocate we
help them choose them), then more tools will be available for your data, and
the tools you write will be more generic.

And they are a perfect match for jQuery's xhtml processing capabilities.

-- Fil


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


Re: [jQuery] Google map plugin idea

2006-09-22 Thread Fil
> I can't think of anything that is semantically remotely correct, and
> while the previously mentioned geo micro format is nice, it's not
> really what I'm looking for.

Why? What are you missing? "geo" if very small and usually is to be embedded
in other microformats, like hCard (for people) or you-name-it for products
(hReview), hAtom (for articles)...

-- Fil


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


Re: [jQuery] Google map plugin idea

2006-09-21 Thread Fil
@ Dylan Verheul <[EMAIL PROTECTED]> :
> Something like this:
> http://www.dyve.net/jquery?googlemaps

This is great Dylan; could be coupled with the "geo" microformat to give a
generic tool. See http://www.jquery.info/spip.php?article7

-- Fil


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


Re: [jQuery] Wildcards

2006-09-20 Thread Fil
> When I started with jquery I advocated for this (powerful and easy to
> implement). I still think it's a good idea, but the answer at the time (last
> August, not so far back...) was that it could be plugged-in *very* easily:
> 
> http://jquery.com/discuss/2006-August/009428/
> http://jquery.com/discuss/2006-August/009429/

I have now tested this plugin a bit extensively, and it works well.

Plugin:
jQuery.parse[0] = [ "\\[ *(@)S *([\\/!*$^=]*) *Q\\]", 1 ];
jQuery.expr['@']['/='] = "new RegExp(m[4]).test(z)";

Usage:
$(document).ready(function(){
  $("[EMAIL 
PROTECTED]/='^.*.toto.(gif|jpg)(\\?.*|$)']").css('color','red');
});

However it breaks on the [ and ] chars.

So we can't write
$("[EMAIL PROTECTED]/='^[a-z]+\\.txt']")

Also, the need for double-backslash is not perfect (but I guess this is out
of jQuery's scope, as we're using quotes-inside-quotes here).

-- Fil


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


Re: [jQuery] Wildcards

2006-09-19 Thread Fil
> Some form of regex as part of the DOM find function in jQuery would be
> great though...

When I started with jquery I advocated for this (powerful and easy to
implement). I still think it's a good idea, but the answer at the time (last
August, not so far back...) was that it could be plugged-in *very* easily:

http://jquery.com/discuss/2006-August/009428/
http://jquery.com/discuss/2006-August/009429/

-- Fil


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


Re: [jQuery] typewriter effect

2006-09-18 Thread Fil
> lynx http://www.jquery.info/IMG/html/19_typewriter.html

OK I have now written an explanation (in French) and finished the code:
http://www.jquery.info/spip.php?article19

But I'm afraid I'm not sure the explanations are understandable... even I
have difficulty reading my text :))

Anyway, what should I do now with this plugin?

-- Fil


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


Re: [jQuery] typewriter effect

2006-09-18 Thread Fil
> Your code may generate
> 
> asdf asdf asdf
> http://www.jquery.info/IMG/html/19_typewriter.html

-- Fil


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


Re: [jQuery] typewriter effect

2006-09-18 Thread Fil
> This works a bit better than before (before it would not handle
> whitespace at the end)

Yes it's a bit better; however the "invisible" style is contained inside the
text, and so the part after  becomes visible again when we are
"typing" the text part.

It would be good if we did not use a , but then we need to
reserve the space for the letters, because we don't want the content to
"push" other content...

but... oh ho!  and here it is!!
$(this).height($(this).height());
$(this).width($(this).width());

Check out the new version at
http://www.jquery.info/IMG/html/19_typewriter.html

It even works with IE!

-- Fil


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


Re: [jQuery] typewriter effect

2006-09-18 Thread Fil
> Just for the record, when I view this page in IE:
> http://www.jquery.info/IMG/html/19_typewriter.html
> nothing happens.

You're right, it doesn't work at all on MSIE.

> Surprisingly it also behaves badly in FF for the PC. It at least tries to
> type itself out, but has some issuies when it gets to the word text.

This is the same on all platforms: it's treating the content char by char,
and shows the "<" of the "" tag...

-- Fil


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


Re: [jQuery] typewriter effect

2006-09-18 Thread Fil
> I am looking for a type-writer effect (the text of an element types 
> out). Anyone aware of this?

Nice idea, I've just tried and done it.

I'll publish it later on jquery.info with explanations, and probably a nicer
code, but you can get a first version here:
http://www.jquery.info/IMG/html/19_typewriter.html

As you can see it works, but it's still a bit rough, especially with the
contents' spaces and tags.

-- Fil


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


[jQuery] a syntax issue

2006-09-16 Thread Fil
Hi,

I'm making the hreflang attribute visible ; css would be :

a[hreflang]:after {
content: "\a0[" attr(hreflang) "]";
}

but it doesn't work on MSIE, so I try the jQuery way:

  $('[EMAIL PROTECTED]').each(function(){
$(this).after(
  ' ['+this.hreflang+']'
);
  });

this works, but it's too much code, I would dream of having a one-liner:

  $('[EMAIL PROTECTED]').after(' ['+this.hreflang+']');

It doesn't work (or, not this way), because 'this' is not the current DOM
node, but the HTMLDocument itself.

-- Fil


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


Re: [jQuery] Safari searchbox, the jQuery way

2006-09-15 Thread Fil
> Doesnt seem to do anything for me on FF/Win

Yes. It does transform the box on Safari, and leaves it as usual on other
browsers (except it empties the field at the first focus).
> > http://www.jquery.info/IMG/html/18_smartsearchbox.html

But I have seen a mock-up thing at
http://www.spisderike.net/artikkel/4060/
that could be added for non-safari browsers, I guess

-- Fil


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


Re: [jQuery] Safari searchbox, the jQuery way

2006-09-15 Thread Fil
> I like the Safari searchbox system, but it's a pity it doesn't validate
> XHTML. So here's my take on it, the jQuery-way:
> http://www.jquery.info/IMG/html/18_safari_searchbox.html

I have now transformed this code into a plugin called "smartsearchbox":
http://www.jquery.info/IMG/html/18_smartsearchbox.html

Usage:

$(document).ready(function(){
  $("[EMAIL PROTECTED]'q']")
  .smartsearchbox({
'autosave':'com.jquery',
'results':'5'
  });
});


If you don't include the options and use $("input").smartsearchbox(), you
still get the safari look, the empty on first click stuff, but no history
and no domain.

-- Fil


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


[jQuery] Safari searchbox, the jQuery way

2006-09-14 Thread Fil
Hi,

I like the Safari searchbox system, but it's a pity it doesn't validate
XHTML. So here's my take on it, the jQuery-way:
http://www.jquery.info/IMG/html/18_safari_searchbox.html

The code is so short I can't help copypasting it here:

$(document).ready(function(){
  var o =
  $('input#search')
  .onefocus(function(){
$(this).attr('value','');
  });
  if (jQuery.browser.safari) {
o.attr('type','search')
 .attr('autosave','com.jquery')
 .attr('results','5');
  }
});


And, I propose that all jQuery blogs that want to use this method use the
same 'autosave' domain (com.jquery) so that the search history is kept
across all our sites!

-- Fil


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


Re: [jQuery] unsubscribe

2006-09-14 Thread Fil
> BTW, if a signature is properly delimited with "-- " (
> [hyphen][hyphen][space] ) just prior to the actual sig, most mail and news
> readers will automatically cut it when replying.
> (... manually deleted...)

I have never seen such a behaviour (I use mutt), and the archives on this
list tend to show the contrary :-)

-- Fil


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


Re: [jQuery] unsubscribe

2006-09-14 Thread Fil
> Why can't you remove yourself?

Usually with Mailman lists you just need to write to
-unsubscribe@, so here you could try sending an email to 

[EMAIL PROTECTED]

I also think there are too many messages on this list, which is a good and a
bad thing :)

And to make things lighter, I would recommend that everyone be careful not
to copy the whole post when they answer (especially removing all
signatures).

-- Fil


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


Re: [jQuery] ImagaBox plugin

2006-09-14 Thread Fil
> I didn't released the plugin yet. Will be documented. Still has some bugs on
> IE, after this are killed will be released

It doesn't work on Safari (at least on my tests).

-- Fil


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


Re: [jQuery] play shanghai w/ jquery

2006-09-09 Thread Fil
> Ok - I finally beat it ;-) I wasn't familiar with it being called
> "Shanghai", I've heard it called Mahjong before:
> http://en.wikipedia.org/wiki/Shanghai_solitaire

Yes, Mah-jong is a more complex game than the solitaire version. I used to
have a Mac shareware called "Shanghai", that's the name I kept.

> could totally get games.jquery.com up and running ;-)

lol. I've now published a first version with an article at:
http://www.jquery.info/spip.php?article16

the game:
http://www.jquery.info/IMG/html/shanghai.html

Thanks to Renato for solving the multiple MSIE compatability issues I had in
the first draft. One worth noting here is that I had used a global variable
called shanghai, and the HTML had a ... bam! The others
were various usual CSS stuff.

What next? Probably nothing from me, as I'm not going to spend my life
making jquery games :-)

However there's room for improvement, in the game itself (currently, it's
ugly and always uses the same arbitrary board). And also in the code itself,
which could use a better data model (here I have no way to know if a piece
is below another piece), and could dispense totally with global variables.
If anyone wants to play with it, go ahead!

-- Fil


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


[jQuery] play shanghai w/ jquery

2006-09-08 Thread Fil
Hi jQueriers,

I've just programmed a small shanghai game in jQuery at
http://www.jquery.info/IMG/html/shanghai.html

however I tested it only on a Mac (Safari and FF); Dave (on the irc channel)
tells me the CSS are not working properly on MSIE. If someone can correct
this, I'll be able to publish the code "for real".

Needless to say, improvements are very welcome, especially CSS/effects.

The to-do list would be:
- debug on IE :-(
- document the code
- create random board at init
- have nice images instead of dumb letters
- generally speaking, have a nice CSS presentation of the game

-- Fil


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


Re: [jQuery] Font-weight modifier in jQuery

2006-09-05 Thread Fil
> This is actually a mistake on my part, I think. I originally had it
> such that you could provide "font-weight" or "fontWeight" and either
> would work in Firefox and IE (parsing the text where necessary). I
> think it must've regressed at some point.

Ah! So I wasn't suddenly crazy :)

And for a dashed name as "font-weigth" I remember had to quote it, as
in {'font-weight': 'bold'}


-- Fil


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


[jQuery] jquery.history.js and Safari

2006-09-05 Thread Fil
Hello !

I wanted to mention that the script at
http://www.mikage.to/jquery/jquery_history.html
fails in Safari.

The cause is that Safari doesn't update the location.hash value when you
press the "Back" button (though the address bar is correct).

Another error was that it added %23 in the URL (that became #%231 instead of
#1). This I fixed at line 52 with:
- location.hash = newhash;
+ location.hash = jQuery.browser.safari?hash:newhash; 

Alas, I don't know how to fix the bigger bug. And I get nightmares just
reading a solution given at
http://bloomd.home.mchsi.com/histapi/howitworks.html

-- Fil


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


Re: [jQuery] Font-weight modifier in jQuery

2006-09-05 Thread Fil
> Maybe John can set up an email reminder when someone commits to the 
> repository :-)

You can use RSS too -- though not linked from the
http://jquery.com/dev/recent/ page, it works :
http://jquery.com/dev/recent/?changeset=on&max=10&daysback=3&format=rss

(Syndicated at http://www.jquery.info/sedna/?id_syndic=7&lang=en )

BTW there's a bug on trac
for example at http://jquery.com/dev/svn/rev/271/
I can't set a cookie to "view differences / side by side" (which is my
favorite view of changes)

-- Fil


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


Re: [jQuery] Font-weight modifier in jQuery

2006-09-05 Thread Fil
> $("p").css({ color: "red", font-weight: "bolder" });

Try
$("p").css({ color: "red", "font-weight": "bolder" });

(The dash needs quoting, I think.)

-- Fil


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


Re: [jQuery] Announcing the new Learning jQuery blog

2006-09-03 Thread Fil
@ Yehuda Katz <[EMAIL PROTECTED]> :
> Very cool guys. And welcome to the third-party documenting jQuery club! The
> community makes us strong.

Indeed! I'm preparing a "news portal" at http://jquery.info/sedna/ (see
http://sedna.spip.org/ to see what it will look like when it is populated,
and click on http://www.jquery.info/sedna/?lang=en&age=31 to get a taste of
it in English and with several articles)

If you gals and guys have jQuery-specific RSS feeds to aggregate (your
documentation blogs, flickr and del.icio.us feeds, technorati and so on),
please pass on the feed URLs.

-- Fil


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


Re: [jQuery] Interface and Safari?

2006-09-02 Thread Fil
@ Morbus Iff <[EMAIL PROTECTED]> :
> I've had reports that Interface, particular the slideshow, doesn't work 
> in Safari. Can anyone corroborate and/or figure out how to fix it? 

It's true. It stays in the "loading" state forever*, while Safari is doing
nothing (not trying to download an image).

* http://fil.rezo.net/slideshow_safari.png

But before being in that state, it first displays two pictures of cars,
floating above the gray square.

-- Fil


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


[jQuery] a fix for getAttribute('action') in forms

2006-08-27 Thread Fil
Hello,

there is (apparently) a bug in MSIE if we use getAttribute('action') on a
form, because it will give us the action property of the form, instead of
the value of its "action" input.

Example :


  


this.getAttribute('action') should be "ok", not "url".

A fix for this is to use:
 this.getAttributeNode('action').nodeValue

(that's Renato's solution to fix form.js at 
http://zone.spip.org/trac/spip-zone/changeset/4794


Another one is to use:
 s = this.getAttribute('action'); 
 if (typeof(s)!='string')
   s = this.attributes.action.value;  

One of these patches might apply to jquery.js and/or form.js

There is definitively a bug here, that doesn't let ajax calls access the
"action" input value of a form.

-- Fil


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


Re: [jQuery] jQuery Getting Started guide

2006-08-26 Thread Fil
> Speaking of translations, Fil, I was thinking of translating some of
> your French stuff into English, what do you think?

It makes me very happy :)

We can imagine putting the translations on this same site, or on yours or on
one of jquery's subsites. I think it ought to be CC-licensed with a
non-commercial basis (in other words, if one of us starts a book, he'd have
to ask permission to include some of the translations).

In any case we will want to have translation links in place so that a reader
can find the translation that suits her best if she happens to find one or
the other version. SPIP (the software I'm co-developing and that runs
jquery.info) does this well.

-- Fil


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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
@ John Resig <[EMAIL PROTECTED]> :
> With jQuery 1.0, you should be able to write your plugin like this:
> $.fn.image = function(src, f){
>   return this.each(function(){
> $("").appendTo(this).src( src ).load( f );
>   });
> };
> 
> Helps to make things a little bit simpler.

Yes it works too, and is much nicer :)

funny thing is that if you replace the main line by:
$("").src( src ).load( f ).appendTo(this);
then the image will display before the alert() fires.
Whereas with your line above (as with my original function) the alert fires
before the image displays (all this in Safari, as with FF it displays and
alerts in both cases.

Might this help explain a part of Safari's oddities (??).

> I like the idea of having the callback for image loading - a smart move.

Me too. It was sDisk's idea.

-- Fil


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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
I made it work both in Safari and FF by changing the insertion sequence:

$.fn.image = function(src, f){
   return this.each(function(){
 $("").appendTo(this).each(function(){
this.src = src;
this.onload = f;
 });
   });
}

$(document).ready(function() {
  $("#container").image("http://jquery.com/images/hat2.gif",function(){
alert("The image is loaded now");
  });
});


Give it a try here:
http://www.jquery.info/IMG/html/8_charger_une_image.html


-- Fil


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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
> Try swapping the order of the lines above to:
> 
> i.onload = f;
> i.src = src;
> 
> So that the onload is set before you start loading the image... Not sure 
> but that may help?

Nope, it doesn't. In fact the image loads (as I can see from Safari's
"Activity" window), and the alert message pops up. But the image doesn't
display.

-- Fil


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


Re: [jQuery] how to load images with jquery ajax?

2006-08-26 Thread Fil
@ SDisk SDisk <[EMAIL PROTECTED]> :
> You can not load images with AJAX simply create a new image object and
> append, then the image can load asyncronously. Try this simple jQuery
> plugin:
> 
> $.fn.image = function(src, f){
>return this.each(function(){
>var i = new Image();
>i.src = src;
>i.onload = f;
>this.appendChild(i);
>});
> }
> 
> Then call this plugin like:
> $("#container").image("http://jquery.com/images/hat2.gif",function(){
>  alert("The image is loaded now");
> });

This works nicely with FF, but not with Safari. Or am I doomed?

-- Fil


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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil
> I have another issue with Safari, and (either/or):
> - jquery-1.0.pack.js
> - form.js (taken from svn this morning)
> - my code
> 
> Here are the tests:
> http://www.jquery.info/IMG/html/6_form_1.0.html
> http://www.jquery.info/IMG/html/6_form_1.0_pack.html
> 
> (The red form has the ajax magic.)
> 
> With the non-compressed jquery, it works in Safari; with the packed jquery
> it fails.

A friend tells me that none of these work with his browser (FF 1.07/win xp).

But maybe this is a form.js problem (or did I use a bad form.js file? --
which one is "the latest"?)

-- Fil


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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil

Here's something else. It used to work with "latest"
<http://jquery.com/src/latest/> but fails with 1.0; both on Safari and FF,
this time.

See it at
  http://www.jquery.info/IMG/html/2_dom.html (with latest, you see "coucou")
  http://www.jquery.info/IMG/html/2_dom_1.0.html (with 1.0, no "coucou")

>>>>>>>>>>>>>>>>>


  http://jquery.com/src/jquery-1.0.js"</a>; 
type="text/javascript">

<!--
  $(document).ready(function () {
$("#texte/p:nth-child(1)").prepend("<div>coucou!</div>");
  });
// -->




Ici, l'introduction




Ici, premier paragraphe de #texte

Ici, deuxième paragraphe de #texte

Ici, troisième paragraphe de #texte

Ici, quatrième paragraphe de #texte



http://www.jquery.info/spip.php?article2";>(article)





-- Fil


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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil
> >  * (Partial) Test Suite
> > http://jquery.com/test/

I have another issue with Safari, and (either/or):
- jquery-1.0.pack.js
- form.js (taken from svn this morning)
- my code

Here are the tests:
http://www.jquery.info/IMG/html/6_form_1.0.html
http://www.jquery.info/IMG/html/6_form_1.0_pack.html

(The red form has the ajax magic.)

With the non-compressed jquery, it works in Safari; with the packed jquery
it fails.

-- Fil


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


Re: [jQuery] jQuery 1.0

2006-08-26 Thread Fil
> I'd like to take this opportunity to announce the brand new jQuery 1.0!

Fantastic! Thanks for mentioning the initial post on your blog too; it shows
how an idea can become reality :)

>  * (Partial) Test Suite
> http://jquery.com/test/

This crashes my Safari, which is a vanilla Mac OS 10.4 version. It's so fast
I can't tell exactly which test crashes it -- probably number 9 or 10.

-- Fil


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


[jQuery] jQuery and the geo microformat

2006-08-20 Thread Fil
Hello,

I've started a modest blog in French about jQuery, mainly to document what
I learn, and show to SPIP users how to use it. So it's mostly constituted
of very simple examples and "discover" articles.

My latest article is an example of processing the geo microformat with
jQuery. Nothing difficult, but I think it's a nice way to show of how these
two techniques can mix, this is why I care to mention it here.

The example is at
http://www.jquery.info/IMG/html/5_geo.html

explanations (in French) at
http://www.jquery.info/spip.php?article7

-- Fil


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


Re: [jQuery] XPath

2006-08-15 Thread Fil

I want the expression to verify that the link is in the correct data
structure, i.e. inside a  that is inside a  and where
$(this).parent().next() is a .

Said differently: I want to tell my script "if the link is inside a 
then show() the corresponding  (if it exists)".

That's why I was trying to use XPath and the parent::x syntax (and failed
miserably, ha ha).


> In the SVN build of jQuery you can do:
> 
> $(this).parent().next().show();
> 
> jQuery SVN can be found here:
> http://jquery.com/src/jquery-svn.js
> 
> --John
> 
> > I have the following structure:
> >
> >
> > x
> > text
> >
> >
> >
> > I select the  element in this, and I want to show() the corresponding dd.
> >
> >
> > This works but is not very precise:
> > $("../../dt/../dd", this).show();
> >
> > I'm trying to write it more precisely with something like:
> > $("parent::dt/parent::dl/dd", this).show();
> >
> > but I'm not finding the correct expression...

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


[jQuery] XPath

2006-08-14 Thread Fil

Hello

I have the following structure:

   
x
text
   


I select the  element in this, and I want to show() the corresponding dd.


This works but is not very precise:
$("../../dt/../dd", this).show();

I'm trying to write it more precisely with something like:
$("parent::dt/parent::dl/dd", this).show();

but I'm not finding the correct expression...

-- Fil


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


Re: [jQuery] Accessing Input Attributes

2006-08-14 Thread Fil
@ Simon Jobling <[EMAIL PROTECTED]> :
> That doesn't seem to help. 

Well, it does work at http://fil.rezo.net/test_jquery.html

-- Fil


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


Re: [jQuery] Accessing Input Attributes

2006-08-14 Thread Fil
> alert($("#btn_save").disabled);

you may .get(0) to get the (first and only) element of $("#btn_save") :

alert($("#btn_save").get(0).disabled);

-- Fil


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


Re: [jQuery] regexp selector

2006-08-11 Thread Fil
@ Aloyzas Rimeika <[EMAIL PROTECTED]> :
> $("[EMAIL PROTECTED], [EMAIL PROTECTED]")

I know there are alternatives for most cases. However you can't beat the
versatility of regular expressions.

> > $("a[href REGEXP '\.(jpg|gif)(\?.*|$)']");

-- Fil


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


[jQuery] regexp selector

2006-08-10 Thread Fil
Hello,

I would like to be able to query with regular expressions, something like,
for example :
$("a[href REGEXP '\.(jpg|gif)(\?.*|$)']");

of course the syntax would not be "REGEXP", but you get the idea.

Is this feasible currently? Judging by the code I've looked at (the public
alpha), I don't think it's difficult to add. I have no idea of the syntax to
use, nor if this has already been implemented.

-- Fil


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


Re: [jQuery] Horiz. Menu with the DOM

2006-08-09 Thread Fil
> Just found the only disadvantage to that is that now the sub-menu width
> *must* be the same width as the parent-menu. Otherwise the sub-div makes
> the parent-div grow too. Don't like that effect/bug on horiz. menus.

This is dealt with in the famous suckerfish menu. see jquery.blog it has
just benn jqueried (jquerized ?)

-- Fil


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