Ok hmmm... thats extremely strange.
I used 1.2.6 for ages and I could swear that .hide and .show were always 
animated. If that's not the case, then thats alright.

Then what do you think of the proposal of allowing an object style input 
to .show, .hide, and .toggle?
The simple animation could be given a name, slideUp and the other 
existing animations could be turned into calls to .show({animate:...}); 
etc, ... And basically the different types of showing or hiding 
something could be made into something extensible:

$('#foo').show(); // Plain display set as current.
$('#foo').show('slow'); // Default animation using slow speed.
$('#foo').show({animate:'fade'}); // Show using a fade animation at 
default speed.
$('#foo').show({animate:'slidedown', speed:'fast'}); // Show using a 
slidedown animation
$('#foo').show({animate:function() {...}); // show using a custom 
animation. (Not quite the same as using .animate; using it though .show 
makes sure that the kind of cleanups and bug tweaks that .show and .hide 
use are applied so the custom function doesn't need to)

I'd need a lookover of the extensibility code to determine the actual 
way a bit of code would look, but basically the list of different types 
of animation could be extended, the short plugin like functions could be 
created if you wanted. But the actual default animation used by 
$('#foo').show('slow'); could be changed to use a different animation 
from the list.

I actually have another note, I forgot about it. I do have a dislike of 
.end, I can't see it's use beyond cases that look like ugly coding.
In the framework I wrote, I actually have a function that for now is 
named .nest, basically it's used something like this (understanding that 
in my framework .append accepts the arguments (tagName, attributes); ):
pf(widget, '.something')
    .append('div')
        .nest(function() {
            this.append('a', {href:'...'}).text('...');
            this.css({color: 'red'});
        })
        .append('ul').nest(function() {
            this.append('li').text('foo');
            this.append('li').text('foo');
        });

~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com]
-Nadir-Point (http://nadir-point.com)
-Wiki-Tools (http://wiki-tools.com)
-MonkeyScript (http://monkeyscript.nadir-point.com)
-Animepedia (http://anime.wikia.com)
-Narutopedia (http://naruto.wikia.com)
-Soul Eater Wiki (http://souleater.wikia.com)

John Resig wrote:
>> If you were wondering what irked me a bit, it was primarily show/hide.
>> $('#foo').hide(); does have the connotation of hiding something.
>> However it always annoyed me how 'hide' was actually a very specific
>> "scale diagonally to the upper left, and disappear". Rather than a
>> simple 'hide me' like it implies.
>> And for just sliding something closed, $('#foo').slideUp(); is used,
>> even though 'slideUp' is basically a type of 'hide' with a different
>> animation. While over on the other hand to actually 'hide' something
>> without animation (I have had to do this many a time) I have to
>> verbosely type in $('#foo').css('display', 'none');
>>     
>
> I can't really speak to the rest of your proposals - since they're
> mostly just name changes - but this is definitely not true. Calling
> .hide() with no arguments does no animation (same with show and
> toggle).
>
> --John
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to