Re: [jQuery] isNot

2006-11-06 Thread Sam Collett
On 06/11/06, Aaron Heimlich [EMAIL PROTECTED] wrote:
 Why not just do

 if(!jQuery(div).is(:foo)) {
 // do stuff...
 }

I thought of that just after hitting send... however, when providing a
function I think it is good to provided a counterpart as well.

While it is documented, 'not' may be misinterpreted as returning a
boolean (in reality it is the opposite of filter).

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


[jQuery] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer
Hi jQueryians!

I actually managed to release my first official and documented jQuery plugin, a 
Tooltip implementation. It doesn't use AJAX, nor extra markup, only title and 
href attributes and some styles. You can customize the delay after which it 
should be displayed, default is instant display when hovering something.

More details and examples can be found here:
http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/

Comments are welcome!

I'll commit the source to the jQuery SVN as soon as it is available again.

--
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] Plugin Release: Tooltip

2006-11-06 Thread Klaus Hartl
Jörn Zaefferer schrieb:
 Hi jQueryians!
 
 I actually managed to release my first official and documented jQuery plugin, 
 a Tooltip implementation. It doesn't use AJAX, nor extra markup, only title 
 and href attributes and some styles. You can customize the delay after which 
 it should be displayed, default is instant display when hovering something.
 
 More details and examples can be found here:
 http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/
 
 Comments are welcome!
 
 I'll commit the source to the jQuery SVN as soon as it is available again.

Hi Jörn,

I like it! Using the title attribute instead of XHR degrades much better 
(uh, it degrades at all). I have done something similiar for Plazes, not 
very mature, quick and easy. Maybe I'm going to switch, but I'd need a 
clickable tooltip (appears on click only).

Maybe you will add that some time?

Is tabs a widget? I'd have to rename it to Tabs() ;-) But I don't like 
that not-yet convention. Having a little Java background uppercased 
class names represent a constructor to me... It is also harder to type in.

Thank you for sharing!


-- Klaus

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


Re: [jQuery] Plugin Release: Tooltip

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

 I actually managed to release my first official and documented jQuery plugin, 
 a Tooltip implementation. It doesn't use AJAX, nor extra markup, only title 
 and href attributes and some styles. You can customize the delay after which 
 it should be displayed, default is instant display when hovering something.

 More details and examples can be found here:
 http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/

 Comments are welcome!

 I'll commit the source to the jQuery SVN as soon as it is available again.

 --
 Jörn Zaefferer

 http://bassistance.de

A suggestion - perhaps you should use 'jQuery' instead of '$' as isn't
that the convention for plugin authoring?

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Klaus Hartl
Sam Collett schrieb:
 On 06/11/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Hi jQueryians!

 I actually managed to release my first official and documented jQuery 
 plugin, a Tooltip implementation. It doesn't use AJAX, nor extra markup, 
 only title and href attributes and some styles. You can customize the delay 
 after which it should be displayed, default is instant display when hovering 
 something.

 More details and examples can be found here:
 http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/

 Comments are welcome!

 I'll commit the source to the jQuery SVN as soon as it is available again.

 --
 Jörn Zaefferer

 http://bassistance.de
 
 A suggestion - perhaps you should use 'jQuery' instead of '$' as isn't
 that the convention for plugin authoring?
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


Jörn took care of that and simulated block scope:

(function($) {

 ...

})(jQuery);


-- Klaus

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Michael Geary
 From: Jörn Zaefferer
 
 I actually managed to release my first official and 
 documented jQuery plugin, a Tooltip implementation. It 
 doesn't use AJAX, nor extra markup, only title and href 
 attributes and some styles. You can customize the delay after 
 which it should be displayed, default is instant display when 
 hovering something.
 
 More details and examples can be found here:
 http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/
 
 Comments are welcome!

Very nice!

It doesn't behave the same as a standard tooltip, though. Tooltips don't
usually track the mouse - once a tooltip is displayed it doesn't move. It
would be nice to have that option. In fact, instead of the defaults being no
delay and mouse tracking, I'd suggest making the defaults follow the most
common tooltip behavior - a short delay and no mouse tracking.

Whatever you make the defaults, it would be more flexible to change the
delay argument to an args object with properties like delay and track and
whatever else comes up later. Then you could code like this:

  $(foo).Tooltip({ delay:250, track:true });

-Mike


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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Michael Geary
  http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/

 A suggestion - perhaps you should use 'jQuery' instead of '$' 
 as isn't that the convention for plugin authoring?

The code does use jQuery instead of $. Jörn used the trick I suggested a
while back to get the best of both worlds - convenient coding with $ but not
using the global $. Note the function wrapper:

 (function($) {
// plugin code here
 })(jQuery);

-Mike


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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer
  A suggestion - perhaps you should use 'jQuery' instead of '$' as isn't
  that the convention for plugin authoring?
  
 Jörn took care of that and simulated block scope:
 
 (function($) {
 
  ...
 
 })(jQuery);

Aye, another lesson I learned from the great Michael Geary :-)

It allows me to use $ and forces a perfect private scope, with making only the 
jQuery method public.

By the way, as nearly no one uses the convention for filenaming 
(jquery.xxx.js): I think it's time to simply remove it, any objections?

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

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Klaus Hartl
Jörn Zaefferer schrieb:
 A suggestion - perhaps you should use 'jQuery' instead of '$' as isn't
 that the convention for plugin authoring?

 Jörn took care of that and simulated block scope:

 (function($) {

  ...

 })(jQuery);
 
 Aye, another lesson I learned from the great Michael Geary :-)
 
 It allows me to use $ and forces a perfect private scope, with making only 
 the jQuery method public.
 
 By the way, as nearly no one uses the convention for filenaming 
 (jquery.xxx.js): I think it's time to simply remove it, any objections?


I use it for the plugins I offer at stilbuero.de, but in SVN I didn't 
adopt that, because all the other plugins didn't either. I'm still for it!


-- Klaus

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


[jQuery] SVN?

2006-11-06 Thread Andre Molnar
Is anyone having problems accessing source via SVN
svn://jquery.com/trunk or svn://jquery.com/plugins

Sorry if this is the wrong place to ask - I tried googling first - but I
keep getting Can't connect to jquery.com...

Is an account required?  Tried with svn+ssh too - no dice.
andre

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Sam Collett
On 06/11/06, Michael Geary [EMAIL PROTECTED] wrote:
   http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/

  A suggestion - perhaps you should use 'jQuery' instead of '$'
  as isn't that the convention for plugin authoring?

 The code does use jQuery instead of $. Jörn used the trick I suggested a
 while back to get the best of both worlds - convenient coding with $ but not
 using the global $. Note the function wrapper:

  (function($) {
 // plugin code here
  })(jQuery);

 -Mike

I've seen that used before, but can it have memory leak or other
issues? Does it work on all modern browsers (and not so modern - IE
5), included those on PDA's etc (not that jQuery supports portable
devices). What happens if 'jQuery' is undefined?

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Sam Collett
On 06/11/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 By the way, as nearly no one uses the convention for filenaming 
 (jquery.xxx.js): I think it's time to simply remove it, any objections?

 --
 Jörn Zaefferer
 http://bassistance.de
 --

I do find it helpful as it shows that jQuery is required to use it.
Although, the other way is to but it in a jquery\plugins subfolder. I
use that convention (but '-' instead of '.'). Saving 7 bytes by
removing it won't really make much difference, unless a page has lots
of plugins (in that circumstance the page would probably be sluggish
on slow computers anyway).

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


Re: [jQuery] Styling a file input control

2006-11-06 Thread George Moschovitis
Thanks for the info, I was  aware of this link. I just wondered if
there was a jquery version available.

regards,
George.

-- 
http://gmosx.com/blog
http://nitroproject.org

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


[jQuery] set focus?

2006-11-06 Thread Jez McKean



I see focus() will 
run the events tied to an elements onfocus, but how can I set the 
focus.
(e.g. click button 
to un-disable a textinput, then set the focus on said 
input.)

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


Re: [jQuery] Also new bug in cookie plugin

2006-11-06 Thread Klaus Hartl
Microtoby schrieb:
 Thanks Klaus,
 I'm using http/1.1, It's my desktop computer, XP system with IIS 5.1, I
 modify the host file, add a test domain name, for example: 127.0.0.1
 demo.com,
 It seems default cookie plug in execute not correctly.

Stupid me, I have taken the max-age part from my JavaScript - The
Definitive Guide book, assuming that it will be ok in IE. But as a
matter of fact IE doesn't support the max-age attribute. So currently in
IE you can only set session cookies.

I'll check that fix in as soon as SVN is available again, I only need to
have a look into an earlier version to rollback.

Oh and by the way, if you start a new thread, please do not reply to
another thread. I'm having a hard time to find these mails again in my
client.


-- Klaus

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


Re: [jQuery] set focus?

2006-11-06 Thread Sam Collett
On 06/11/06, Jez McKean [EMAIL PROTECTED] wrote:


 I see focus() will run the events tied to an elements onfocus, but how can I
 set the focus.
 (e.g. click button to un-disable a text input, then set the focus on said
 input.)

 Regards,
  Jez

$(#myinput)[0].focus()

Perhaps calling focus ($(#myinput).focus()) should actually set the
focus on the element as well as fire the onfocus event - rather than
just fire the event.

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


[jQuery] Unsure about the usage of .parent()

2006-11-06 Thread gilles
Why does .parent() modify the original object? This isn't right according
to me.

Let's say i have this code:
testDOM = SOMEOBJECT.parent().parent()[0];

And i want to do some more work on the original object;
SOMEOBJECT.hide();

I get this error:
.. IS NOT A FUNCTION

I am unsure on how to correctly get the parent's parent without changing
the original object.

-- Gilles


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


Re: [jQuery] Unsure about the usage of .parent()

2006-11-06 Thread Klaus Hartl
[EMAIL PROTECTED] schrieb:
 Why does .parent() modify the original object? This isn't right according
 to me.
 
 Let's say i have this code:
 testDOM = SOMEOBJECT.parent().parent()[0];
 
 And i want to do some more work on the original object;
 SOMEOBJECT.hide();
 
 I get this error:
 .. IS NOT A FUNCTION
 
 I am unsure on how to correctly get the parent's parent without changing
 the original object.
 
 -- Gilles


Use a cloned object or end():

var testDOM = $( SOMEOBJECT ).parent().parent()[0];
SOMEOBJECT.hide();

or:

testDOM = SOMEOBJECT.parent().parent()[0];
SOMEOBJECT.end().end().hide();


-- Klaus

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


Re: [jQuery] New Plugin: Resizeable

2006-11-06 Thread Mark Gibson
Stephen Woodbridge wrote:
 Hi Stefan,
 
 I have been trying your resize plugin, it is really slick and works great!
 
 I have a request, does it already have or can you add the ability to 
 added a call back at the end of the resize, so other code can be 
 notified of the change in size? Like notify below:
 
 $(document).ready(function(){
  $('#resize_map').Resizeable(
  {
  minHeight: 100,
  maxHeight: 700,
  minWidth: 100,
  maxWidth: 800,
  handlers: {
  se: '#resize'
  },
  notify: function(){
  alert(I have been resized);
  $('#map_tag').Resized(this.sizes);
  }
  }
  );
 });
 
 Maybe there is another way to do this?

Would this not be better suited to an event?

$('#resize_map').bind('resize', function() {
 alert(I have been resized);
});

I've not had chance to test it, but I'm sure all elements
have a resize event. If not then the resizeable plugin can
trigger() it itself.


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


Re: [jQuery] set focus?

2006-11-06 Thread Jörn Zaefferer
 Perhaps calling focus ($(#myinput).focus()) should actually set the
 focus on the element as well as fire the onfocus event - rather than
 just fire the event.

It would help if the event shortcuts were less ambigous, eg. onfocus() instead 
of focus(). If so, it would be easy to add focus to actually call focus on the 
first element, eg.

jQuery.fn.focus = function() {
  if(this.length  0)
this[0].focus();
  return this;
};

I wonder if that would trigger the focus events for that element...

--
Jörn Zaefferer

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

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer
 I like it! Using the title attribute instead of XHR degrades much better 
 (uh, it degrades at all). I have done something similiar for Plazes, not 
 very mature, quick and easy. Maybe I'm going to switch, but I'd need a 
 clickable tooltip (appears on click only).
 
 Maybe you will add that some time?

Something like this?

$(#container a).addClass(clickable).Tooltip({show: onclick});

 Is tabs a widget? I'd have to rename it to Tabs() ;-) But I don't like 
 that not-yet convention. Having a little Java background uppercased 
 class names represent a constructor to me... It is also harder to type in.

Stefan uses that in all his Interface stuff. After thinking about it again and 
again (with lots of Java-Background), I thought it would be a nice way to show 
the difference between simple methods and complex widget methods. Tabs 
would be a widget, just like a Thickbox, a sortable table, accordion etc.

--
Jörn Zaefferer

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

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


Re: [jQuery] SVN?

2006-11-06 Thread Microtoby
I have the same error,
Can't connect to host 'jquery.com':no connection could be made because the
target machine actively refused it.


Toby
2006-11-6

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andre Molnar
Sent: 2006年11月6日 18:14
To: discuss@jquery.com
Subject: [jQuery] SVN?

Is anyone having problems accessing source via SVN
svn://jquery.com/trunk or svn://jquery.com/plugins

Sorry if this is the wrong place to ask - I tried googling first - but I
keep getting Can't connect to jquery.com...

Is an account required?  Tried with svn+ssh too - no dice.
andre

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


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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer
 It doesn't behave the same as a standard tooltip, though. Tooltips don't
 usually track the mouse - once a tooltip is displayed it doesn't move. It
 would be nice to have that option. In fact, instead of the defaults being
 no
 delay and mouse tracking, I'd suggest making the defaults follow the most
 common tooltip behavior - a short delay and no mouse tracking.

Good suggestion! I'll add that.

 
 Whatever you make the defaults, it would be more flexible to change the
 delay argument to an args object with properties like delay and track and
 whatever else comes up later. Then you could code like this:
 
   $(foo).Tooltip({ delay:250, track:true });

How about:

$(a).Tooltip({show: 250, track: true});

So show would have either a Number value (delay) or a String like onclick or 
click. click would be intersting, then I could implement that like this:

[...]
if(typeof settings.show == String)
  this[settings.show](show);
[...]

According to Klaus' request to show the tooltip when the element is clicked.

--
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] Scroll document if draggable leaves viewport

2006-11-06 Thread Eckhard Rotte
Hm. and what about the OP?
once again:


Hi jQueries,

i've posted this mail 2 times ago, but it didn't appear in the mailing
list. Only the web frontend did get it, nothing in my inbox.
Did you get it?
I'll try it once again:
-

Is it possible to get a scrolling feature for any drag/droppable?
For Example:
If you leave the viewport with an object and the document body is longer
or wider than the viewport, the document scrolls connected to the mouse
position.

This YUI demo is a good example:
http://developer.yahoo.com/yui/examples/dragdrop/ontop.html?mode=dist

Is somebody working on it or did I miss it in the documentation? Or is
there a simple way to implement this feature?


regards
ecki

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


Re: [jQuery] jQuery 1.0.3 .click() not firing in IE

2006-11-06 Thread Karl Swedberg
On Nov 6, 2006, at 12:25 AM, Marshall Salinger wrote:

 I am not set-up to connect to SVN. I tried calling the method with a
 blank object and it broke both FF and IE.


You can get to SVN on the web, too, if you want. Start at
http://jquery.com/dev/svn/trunk/jquery/
and poke around until you find what you're looking for.

When you get to a page of code that you want to grab, just add the  
following to the URI:
?format=txt

Cheers,
Karl
___
Karl Swedberg
www.englishrules.com
www.learningjquery.com



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


Re: [jQuery] set focus?

2006-11-06 Thread Jez McKean
Great, thanks. :)

BTW: I have found that this is also true of .select()


 Perhaps calling focus ($(#myinput).focus()) should actually set the
focus on the element...

I guess actually it might cause difficulty if another selector type was
used since there may be more than on match.

Jez


-Original Message-
From: Sam Collett [mailto:[EMAIL PROTECTED] 
Sent: 06 November 2006 12:07
To: jQuery Discussion.
Subject: Re: [jQuery] set focus?

On 06/11/06, Jez McKean [EMAIL PROTECTED] wrote:


 I see focus() will run the events tied to an elements onfocus, but how

 can I set the focus.
 (e.g. click button to un-disable a text input, then set the focus on 
 said
 input.)

 Regards,
  Jez

$(#myinput)[0].focus()

Perhaps calling focus ($(#myinput).focus()) should actually set the
focus on the element as well as fire the onfocus event - rather than
just fire the event.



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


[jQuery] jQuery Forums soon?

2006-11-06 Thread Jez McKean



If not I would 
happily host something small and temporary...

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


Re: [jQuery] jQuery Forums soon?

2006-11-06 Thread Rey Bango
This is working pretty good right now:

http://www.nabble.com/JQuery-f15494.html

Rey...

Jez McKean wrote:
 If not I would happily host something small and temporary...
  
 Jez
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

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


[jQuery] jQuery Button - Time to Vote - Get Involved!

2006-11-06 Thread Rey Bango
 From John:

The next round of the jQuery Button Contest is upon us! After some 
careful deliberation, the judges have narrowed the playing field of 123 
jQuery button submissions down to just 30. We were completely 
overwhelmed with both the quality and quantity of submission and would 
like to personally thank everyone who participated. There were a ton of 
excellent entries but ultimately the following 30 buttons were chosen 
due to their clarity, composition, and originality.

Now it’s your turn to help! In order to narrow the results down to the 
final three, winning, buttons we need you to vote for which buttons that 
you like. You’re allowed to vote for as many buttons as you’d like, but 
only once.

You can vote here:

http://jquery.com/blog/2006/11/06/vote-for-the-jquery-button/

The polls will be closed Monday 11:59pm (EST, GMT -0500). So get your 
voting in now - and make your decision count!

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


Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-06 Thread Dave Methvin
 Do you know what the nodeType test is for on that line? 

That nodeType test is trying to tell the difference between a NodeList and a
DOMElement. If it's a DOMElement it will have a non-zero nodeType.

 What would break if we took it out?

If you took it out, any DOMElement with a .length property would be treated
like a list and not an element. For example, the form element has a length.
If you passed in $(document.myform) and myform had 3 elements, jQuery.length
would be 3 instead of 1. 

The intent was to allow collections like form.elements to pass in lists of
nodes but still let you pass in the form element if you wanted to refer to
just the form element. IE is spoiling that.



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


[jQuery] IE and the escape key triggering a hide action

2006-11-06 Thread Klaus Hartl
I just came across something in IE, that I hadn't noticed so far: It 
seems that the escape key triggers some action by default:

Say you have a link which on click opens a form via slide down. If you 
then press the escape key, the form slides up again... Is it just me or 
did someone else notice that as well? Just wondering if it's Plazes 
specific due to my style of coding.

For example have a look at the http://plazes.com homepage (sorry, this 
is no advertise): There's a login link in the upper right corner, that 
triggers a login form to be revealed. If the form is visible in IE press 
escape and you will see, that it gets hidden again...

I really don't know what's happening?


-- Klaus

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Andy Matthews
I get an error in IE6/PC on your demo page.

!//--
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 Jörn Zaefferer
Sent: Monday, November 06, 2006 3:20 AM
To: discuss@jquery.com
Subject: [jQuery] Plugin Release: Tooltip


Hi jQueryians!

I actually managed to release my first official and documented jQuery
plugin, a Tooltip implementation. It doesn't use AJAX, nor extra markup,
only title and href attributes and some styles. You can customize the delay
after which it should be displayed, default is instant display when hovering
something.

More details and examples can be found here:
http://bassistance.de/index.php/jquery-plugins/jquery-plugin-tooltip/

Comments are welcome!

I'll commit the source to the jQuery SVN as soon as it is available again.

--
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 mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Star Rating Plugin?

2006-11-06 Thread Andy Matthews



Yehuda...

But 
what if for some reason the user didn't submit the form? Then they'd think that 
they rated/voted, when in reality they didn't.

!//--andy matthewsweb 
developercertified advanced coldfusion programmerICGLink, 
Inc.[EMAIL PROTECTED]615.370.1530 
x737--//- 

  -Original Message-From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]On Behalf Of Yehuda 
  KatzSent: Saturday, November 04, 2006 6:05 PMTo: jQuery 
  Discussion.Subject: Re: [jQuery] Star Rating 
  Plugin?The only difficult thing about a star plugin is 
  reporting fractional star-counts. Otherwise, it's *really* trivial. I would 
  use a hidden text-field or somesuch, and bind clicking the stars to updating 
  the field.As to reporting the existing star counts, you could use a 
  blank star template stick it in front of a full star image, which increases or 
  decreases in size based upon the value of the hidden field. -- 
  Yehuda
  On 11/4/06, Rey 
  Bango [EMAIL PROTECTED] 
  wrote:
  How 
about recreating it from scratch?Rey...Dragan Krstic 
wrote: I did similar thing, fully unobtrusive, as part o some cms. 
It is very similar, but I'm not allowed to post it, shmr, shmrc... 
 - Original Message - From: "Ⓙⓐⓚⓔ" [EMAIL PROTECTED] To: 
"jQuery Discussion."  
discuss@jquery.com Sent: Saturday, November 04, 2006 6:37 
AM Subject: Re: [jQuery] Star Rating 
Plugin?something 
like:$("a.starRating 
").each(function(){var $this = $(this);var href = 
"">var stars = 
$this.text();$this.empty();for (var i = 0; i  
stars.length; i++){$this.append("span class = '" + (i+1) + 
"'" + stars.substr(i,1) + 
"/span");}$this.children('span').click(function(){$.get(href,{rating:this.className});$this.children('span').removeClass("selected"); 
$(this).addClass("selected");return 
false;})});rate mea 
class="starRating" href=""✰/a! 
dom tested , but I didn't write the cgi or the 
styles.PSthose are utf-8 stars in the 
aOn 11/3/06, Sean O  [EMAIL PROTECTED] 
wrote:Looking for something to rate the JQuery 
Button submissions, 
Rey?;)___SEAN 
O Rey 
Bango-2 wrote:Has a 
star rating plugin like this: 
http://www.masugadesign.com/the-lab/scripts/unobtrusive-ajax-star-rating-bar/been 
developed?Rey...___ 
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ 
--View 
this message in context:http://www.nabble.com/Star-Rating-Plugin--tf2572187.html#a7171176 
Sent from the JQuery mailing list archive at Nabble.com.___jQuery 
mailing list discuss@jquery.comhttp://jquery.com/discuss/--Ⓙⓐⓚⓔ 
- יעקב ʝǡǩȩ ᎫᎪᏦᎬ 
___jQuery 
mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ 
 
___ jQuery mailing 
list discuss@jquery.com http://jquery.com/discuss/___jQuery 
mailing listdiscuss@jquery.comhttp://jquery.com/discuss/ 
  -- Yehuda KatzWeb 
  Developer | Wycats Designs(ph)718.877.1325 

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


Re: [jQuery] IE and the escape key triggering a hide action

2006-11-06 Thread Klaus Hartl
Klaus Hartl schrieb:
 I just came across something in IE, that I hadn't noticed so far: It 
 seems that the escape key triggers some action by default:
 
 Say you have a link which on click opens a form via slide down. If you 
 then press the escape key, the form slides up again... Is it just me or 
 did someone else notice that as well? Just wondering if it's Plazes 
 specific due to my style of coding.
 
 For example have a look at the http://plazes.com homepage (sorry, this 
 is no advertise): There's a login link in the upper right corner, that 
 triggers a login form to be revealed. If the form is visible in IE press 
 escape and you will see, that it gets hidden again...
 
 I really don't know what's happening?
 
 
 -- Klaus

Ah, I got it. If you have an input/button of type reset, the escape 
key triggers that action in IE...

Ugh!


-- Klaus

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


Re: [jQuery] IE and the escape key triggering a hide action

2006-11-06 Thread Jörn Zaefferer
 I just came across something in IE, that I hadn't noticed so far: It 
 seems that the escape key triggers some action by default:
 
 Say you have a link which on click opens a form via slide down. If you 
 then press the escape key, the form slides up again... Is it just me or 
 did someone else notice that as well? Just wondering if it's Plazes 
 specific due to my style of coding.
 
 For example have a look at the http://plazes.com homepage (sorry, this 
 is no advertise): There's a login link in the upper right corner, that 
 triggers a login form to be revealed. If the form is visible in IE press 
 escape and you will see, that it gets hidden again...
 
 I really don't know what's happening?

Do you use Thickbox for that form? If so, take a look at it's document.onkeyup 
binding. If not: Ugh, no idea.

I took a look, but couldn't find it for myself...

--
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] Plugin Release: Tooltip

2006-11-06 Thread Paul McLanahan
Excellent work Jörn (yet again),

The only suggestion I have deals with displaying the tips close to the
right side of the screen.  You do an excellent job of handling the
width of the tip when it is close to the right edge of the window, but
if a word is too long inside of the tip it will push outside of the
viewable area and cause the horizontal scroll bar to appear.  I would
suggest that you attempt to detect that situation and flip the tip so
that it shows to the left of the pointer when it is too wide to be
completely within the window.

@Mike

Thanks for bringing up that tip about the function wrapper to localize
$ scope. I hadn't seen that before. Very useful.

Paul

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


Re: [jQuery] IE and the escape key triggering a hide action

2006-11-06 Thread Webunity | Gilles van den Hoven

 Ah, I got it. If you have an input/button of type reset, the escape 
 key triggers that action in IE...
   
Jep, funny huh?


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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer
 I get an error in IE6/PC on your demo page.

I just tested it again but couldn't see any issues. Could give me a hint what 
exactly is failing?

By the way, it's interesting that IE reports src attributes as href 
attributes...

--
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] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer
 The only suggestion I have deals with displaying the tips close to the
 right side of the screen.  You do an excellent job of handling the
 width of the tip when it is close to the right edge of the window, but
 if a word is too long inside of the tip it will push outside of the
 viewable area and cause the horizontal scroll bar to appear.  I would
 suggest that you attempt to detect that situation and flip the tip so
 that it shows to the left of the pointer when it is too wide to be
 completely within the window.

That problem occurs most frequently when trying to display long URLs within the 
tooltip. Your suggestion of flipping the tooltip would be the best solution, 
but not easy to implement. I should ask Karl Swedberg for his experience on 
that topic, I think he and Rey already (tried to) solve that for their jTip 
adoption.

--
Jörn Zaefferer

http://bassitance.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] Plugin Release: Tooltip

2006-11-06 Thread Christopher Jordan




I get the
error too. Here's a screen shot:



Hope this helps.
Chris

Jrn Zaefferer wrote:

  
I get an error in IE6/PC on your demo page.

  
  
I just tested it again but couldn't see any issues. Could give me a hint what exactly is failing?

By the way, it's interesting that IE reports src attributes as href attributes...

--
Jrn Zaefferer

http://bassistance.de
  



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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Andy Matthews
In IE6/PC I get the following error on load.

Line 18
Char 1
Error: Object doesn't support this property or method
Code: 0

Just to point out though that the Tooltip works on the previous page for the
demo link.

!//--
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 Jörn Zaefferer
Sent: Monday, November 06, 2006 8:36 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Plugin Release: Tooltip


 I get an error in IE6/PC on your demo page.

I just tested it again but couldn't see any issues. Could give me a hint
what exactly is failing?

By the way, it's interesting that IE reports src attributes as href
attributes...

--
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 mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Parsing XML

2006-11-06 Thread Richard Clare








Hi Blair



Thanks for your suggestion. Seems to work
perfectly in Firefox but not in IE6.



I think it takes objection to this line:



var $this=$(this);



and says error: object required



Any ideas on how to fix it?



Thanks



Richard











From: Blair McKenzie
[mailto:[EMAIL PROTECTED] 
Sent: 02 November 2006 22:55
To: [EMAIL PROTECTED];
jQuery Discussion.
Subject: Re: [jQuery] Parsing XML





I would suggest this:



var reminders = [];
$('reminder',xml).each(function(i) { // apply this function to each reminder
(index as parameter)



var $this=$(this); // each applies the function so that 'this' is the
relevant element 





reminders[i] = { 



id:$this.find(id).text(), 
date:$this.end().find(date).text(), // end() because the previous
find(id) is persistent 
event:$this.end().find(event).text(),
start:$this.end().find(start).text(),
end:$this.end().find(end).text(),



};



});



Blair








--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.28/518 - Release Date: 04/11/2006
 
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer
 I'm getting...
 
 $(a, label, input).not(#yahoo).Tooltip is not a function
 
 In FF 1.5.0.7/Win, and FF 2.0 Linux.  And I get the Object doesn't
 support this property or method worthless error in IE7.

Oh bugger. I just forgot to update the html file, sorry for the confusion. All 
reported errors should be history now :-)

FF, IE and Opera seem to work fine now.

--
Jörn Zaefferer

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

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


Re: [jQuery] New way of animating

2006-11-06 Thread George Adamson


jQuery can do everything that it can, natively (except color animation).

Just as an aside, if anyone needs colour animation then
http://jquery.offput.ca/highlightFade/ works well for animating color,
backgroundcolor or bordercolor. (Though you might not immediately guess from
its name)

George
-- 
View this message in context: 
http://www.nabble.com/New-way-of-animating-tf2568944.html#a7200316
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Andy Matthews
I just tested the demo page with FF 1.5.0.7 and it works great, but there's
an oddity that I wanted to tell you about.

Loading the page from scratch and all of the tooltips work as advertised,
but when I mouseover the 3rd yahoo link (link to Yahoo2), then click the
Tonus image, the tooltip is now empty.

I can recreate it every time with those steps. Furthermore, it appears that
you can also get the same results with other steps, but the ones I listed
will work for you.

!//--
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 06, 2006 8:59 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Plugin Release: Tooltip


In IE6/PC I get the following error on load.

Line 18
Char 1
Error: Object doesn't support this property or method
Code: 0

Just to point out though that the Tooltip works on the previous page for the
demo link.

!//--
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 Jörn Zaefferer
Sent: Monday, November 06, 2006 8:36 AM
To: jQuery Discussion.
Subject: Re: [jQuery] Plugin Release: Tooltip


 I get an error in IE6/PC on your demo page.

I just tested it again but couldn't see any issues. Could give me a hint
what exactly is failing?

By the way, it's interesting that IE reports src attributes as href
attributes...

--
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 mailing list
discuss@jquery.com
http://jquery.com/discuss/


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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Jörn Zaefferer

 Original-Nachricht 
Datum: Mon, 6 Nov 2006 09:12:06 -0600
Von: Andy Matthews [EMAIL PROTECTED]
An: jQuery Discussion. discuss@jquery.com
Betreff: Re: [jQuery] Plugin Release: Tooltip

 I just tested the demo page with FF 1.5.0.7 and it works great, but
 there's
 an oddity that I wanted to tell you about.
 
 Loading the page from scratch and all of the tooltips work as advertised,
 but when I mouseover the 3rd yahoo link (link to Yahoo2), then click the
 Tonus image, the tooltip is now empty.
 
 I can recreate it every time with those steps. Furthermore, it appears
 that
 you can also get the same results with other steps, but the ones I listed
 will work for you.

Thanks. That is the problem I mentioned, but unfortuanetely, I can't recreate 
steadily.

--
Jörn Zaefferer

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

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


Re: [jQuery] New way of animating

2006-11-06 Thread Dan Atkinson

I'm sorry, I'm not convinced.

Pretty much everything in there is in jQuery standalone. I'm not sure about
the 'killer feature' either.

An expanding div is not a killer feature. That is effectively just like
$.show('slow'). The same killer feature code could be written in about an
eighth of this in jQuery.

Don't get me wrong though. I'm glad people are doing this for the
scriptaculous and moo folks. Christ knows they need some form of morale
boost.

Cheers for the link anyhoo.


Paul Bakaus wrote:
 
 Hey guys,
 
 has someone seen this at ajaxian? Check it out:
 http://berniecode.com/writing/animator.html
 This is probably the most sexiest animate lib I've ever seen in my life.
 Porting this to jQuery would be the PERFECT addition to jQuery's css
 parsing
 possiblities.
 
 What do you think?
 
 -- 
 Paul Bakaus
 Web Developer
 
 Hildastr. 35
 79102 Freiburg
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 

-- 
View this message in context: 
http://www.nabble.com/New-way-of-animating-tf2568944.html#a7200630
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
If all the animation features are in jQuery standalone, then I'm onboard 
with Dan.

What would be good, though, is if a page showing this being done in 
jQuery was created. Paul, are you up for that challenge? :o)

Rey...

 Paul Bakaus wrote:
 
Hey guys,

has someone seen this at ajaxian? Check it out:
http://berniecode.com/writing/animator.html
This is probably the most sexiest animate lib I've ever seen in my life.
Porting this to jQuery would be the PERFECT addition to jQuery's css
parsing
possiblities.

What do you think?

-- 
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg

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


 
 

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


Re: [jQuery] New way of animating

2006-11-06 Thread Paul Bakaus
Sure Rey ;-)Maybe my email was a bit too enthusiastic. Don't get me wrong, I'm not talking about the script itself, of course it has some problems and drawbacks and whatelse. And I really like the way of jQuery animating styles.
It's all about the method.Having a div-element with a certain style, then the jQuery way could be like this:1.) $(#mydiv).animateStyle(background-color: #eee; border: 1px solid black; opacity: 
0.5;);-If only one param given, this function animates from the current style of the element, to the one given into the function.2) $(#mydiv).animateStyle(old, new);-animate from one style to the second
but now my own killer feature :D3.) $(#mydiv).animateClass(oldClass, newClass); -or- $(#mydiv).animateClass(newClass);-So you change the class of the object, but you animate the change.
Waiting for comments!2006/11/6, Rey Bango [EMAIL PROTECTED]:
If all the animation features are in jQuery standalone, then I'm onboardwith Dan.What would be good, though, is if a page showing this being done injQuery was created. Paul, are you up for that challenge? :o)
Rey... Paul Bakaus wrote:Hey guys,has someone seen this at ajaxian? Check it out:http://berniecode.com/writing/animator.html
This is probably the most sexiest animate lib I've ever seen in my life.Porting this to jQuery would be the PERFECT addition to jQuery's cssparsingpossiblities.
What do you think?--Paul BakausWeb DeveloperHildastr. 3579102 Freiburg___
jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Paul BakausWeb DeveloperHildastr. 3579102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] IE and the escape key triggering a hide action

2006-11-06 Thread Klaus Hartl
Jörn Zaefferer schrieb:
 I just came across something in IE, that I hadn't noticed so far: It 
 seems that the escape key triggers some action by default:

 Say you have a link which on click opens a form via slide down. If you 
 then press the escape key, the form slides up again... Is it just me or 
 did someone else notice that as well? Just wondering if it's Plazes 
 specific due to my style of coding.

 For example have a look at the http://plazes.com homepage (sorry, this 
 is no advertise): There's a login link in the upper right corner, that 
 triggers a login form to be revealed. If the form is visible in IE press 
 escape and you will see, that it gets hidden again...

 I really don't know what's happening?
 
 Do you use Thickbox for that form? If so, take a look at it's 
 document.onkeyup binding. If not: Ugh, no idea.
 
 I took a look, but couldn't find it for myself...

If you want to disable that behavior (I had to because pressing escape 
in a thickbox screen triggered the hide on reset...):

if ($.browser.msie) {
 $(document).keydown(function() {
 window.stopEsc = true;
 }).keyup(function() {
 window.stopEsc = false;
 });
}

and then:

$('form').reset(function() {
 if (window.stopEsc)  return false; // in IE the escape key triggers 
the reset action of a form, don't wan't that here
}

Fortunately the reset event is fired between keydown and keyup, tested 
in IE 6/7...


-- Klaus

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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
Well, I guess we disagree again.

In my opinion, if someone has created something very cool, then I don't 
see why people shouldn't try to replicate it using their favorite library.

In this case, if Paul created a page showing how this could be done in 
jQuery, it could be put into the demo page and leveraged as a way to 
show new users how to add those cool types of animations.

Rey...

Dan Atkinson wrote:
 There's a whole page of various plugins that can be attached to jQuery.
 
 http://jquery.com/plugins/
 
 In my opinion, going after individuals who show their work would not only be
 a childish 'me too'-ism, but it would be damaging to the reputation of
 jQuery, as it would just make people think that we don't have our own ideas,
 so we have to copy those of others.
 
 
 Rey Bango-2 wrote:
 
If all the animation features are in jQuery standalone, then I'm onboard 
with Dan.

What would be good, though, is if a page showing this being done in 
jQuery was created. Paul, are you up for that challenge? :o)

Rey...


Paul Bakaus wrote:


Hey guys,

has someone seen this at ajaxian? Check it out:
http://berniecode.com/writing/animator.html
This is probably the most sexiest animate lib I've ever seen in my life.
Porting this to jQuery would be the PERFECT addition to jQuery's css
parsing
possiblities.

What do you think?

-- 
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg

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




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


 
 

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


Re: [jQuery] New way of animating

2006-11-06 Thread Paul Bakaus
Dan,Adapting good ideas from other sources is not something evil, but often a important step to a good solution.There is a active _javascript_ community around us, and many influences went into the creation of our all beloved jQuery.
For example, Dean Edwards had the same approach of a cs selector.While I think you are a creative person yourself, I'm absolutely sure you are being influenced by many different sources, too.No offense, but I'm convinced you know that I know about our plugins (since I'm contributing from time to time), and calling people childish because of them adapting ideas from various sources is something I for myself cannot understand.
2006/11/6, Dan Atkinson [EMAIL PROTECTED]:
There's a whole page of various plugins that can be attached to jQuery.http://jquery.com/plugins/In my opinion, going after individuals who show their work would not only be
a childish 'me too'-ism, but it would be damaging to the reputation ofjQuery, as it would just make people think that we don't have our own ideas,so we have to copy those of others.Rey Bango-2 wrote:
 If all the animation features are in jQuery standalone, then I'm onboard with Dan. What would be good, though, is if a page showing this being done in jQuery was created. Paul, are you up for that challenge? :o)
 Rey... Paul Bakaus wrote:Hey guys,has someone seen this at ajaxian? Check it out:
http://berniecode.com/writing/animator.htmlThis is probably the most sexiest animate lib I've ever seen in my life.Porting this to jQuery would be the PERFECT addition to jQuery's css
parsingpossiblities.What do you think?--Paul BakausWeb Developer
Hildastr. 3579102 Freiburg___jQuery mailing list
discuss@jquery.comhttp://jquery.com/discuss/ ___
 jQuery mailing list discuss@jquery.com http://jquery.com/discuss/--View this message in context: 
http://www.nabble.com/New-way-of-animating-tf2568944.html#a7201229Sent from the JQuery mailing list archive at 
Nabble.com.___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Paul BakausWeb DeveloperHildastr. 3579102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] stripping out tags...

2006-11-06 Thread Stamen Georgiev
Hi there...

I was about to ask how to strip a tag from the DOM.
For example we have this:

div id=someId
label for=someForsome spantext/span here/label
/div

I want to remove the label tag and preserve what it contains.

But while I was writing my question, I came up with this:

jQuery.fn.stripOut = function (el) {
$(this).each( function(){
$(this).find(el).parent().html(($(this).find(el).html()));
})
}

so we can do:

$(#someID).stripOut(label);
This will produce:

div id=someId
some spantext/span here
/div

But I see a tiny problem here...
If we have for example:

div id=someId
some div text
label for=someForsome spantext/span here/label
some div text
/div

with my stripOut() the text some div text together with all the eventual 
siblings of the label tag will go pooof.

I'm not good at the coding, so can somebody help me with a better solution? 


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


Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-06 Thread Brandon Aaron
Okay ... looking through all the properties of the form.elements
nodelist in IE reveals that it is exactly the form element as you
said. That also means it has a reference to the elements property. So
to fix this 'special case' I added this:

this.get( a.constructor == Array || a.length != undefined  (
!a.nodeType || (jQuery.browser.msie  a.elements) )  a[0] !=
undefined  a[0].nodeType ?

This appears to work fine but I don't know if it will affect anything else.
http://brandon.jquery.com/testing/node_lists/

If it doesn't break anything else, then we should probably get this
and the fix for #164 in SVN and get another point release out the
door.

--
Brandon Aaron

On 11/6/06, Dave Methvin [EMAIL PROTECTED] wrote:
  Do you know what the nodeType test is for on that line?

 That nodeType test is trying to tell the difference between a NodeList and a
 DOMElement. If it's a DOMElement it will have a non-zero nodeType.

  What would break if we took it out?

 If you took it out, any DOMElement with a .length property would be treated
 like a list and not an element. For example, the form element has a length.
 If you passed in $(document.myform) and myform had 3 elements, jQuery.length
 would be 3 instead of 1.

 The intent was to allow collections like form.elements to pass in lists of
 nodes but still let you pass in the form element if you wanted to refer to
 just the form element. IE is spoiling that.



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


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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
Hi Paul,

This is the type of stuff that I think would be OOO helpful in a 
tutorial or demo page. Like a best practices type of thing. I recently 
spent a lot of time talking to John about how to get the project more 
exposure and one of the things we threw out was getting more examples of 
coding practices on the site.

Would you mind terribly jotting down some of these examples? I think 
they'd really help new users transition to jQuery.

Let me know.

Rey...

Paul Bakaus wrote:
 Sure Rey ;-)
 
 Maybe my email was a bit too enthusiastic. Don't get me wrong, I'm not 
 talking about the script itself, of course it has some problems and 
 drawbacks and whatelse. And I really like the way of jQuery animating 
 styles.
 
 It's all about the method.
 
 Having a div-element with a certain style, then the jQuery way could be 
 like this:
 
 1.) $(#mydiv).animateStyle(background-color: #eee; border: 1px solid 
 black; opacity: 0.5;);
 -If only one param given, this function animates from the current style 
 of the element, to the one given into the function.
 
 2) $(#mydiv).animateStyle(old, new);
 -animate from one style to the second
 
 but now my own killer feature :D
 
 3.) $(#mydiv).animateClass(oldClass, newClass); -or- 
 $(#mydiv).animateClass(newClass);
 -So you change the class of the object, but you animate the change.
 
 Waiting for comments!
 
 2006/11/6, Rey Bango [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
 
 If all the animation features are in jQuery standalone, then I'm onboard
 with Dan.
 
 What would be good, though, is if a page showing this being done in
 jQuery was created. Paul, are you up for that challenge? :o)
 
 Rey...
 
   Paul Bakaus wrote:
  
  Hey guys,
  
  has someone seen this at ajaxian? Check it out:
  http://berniecode.com/writing/animator.html
 http://berniecode.com/writing/animator.html
  This is probably the most sexiest animate lib I've ever seen in
 my life.
  Porting this to jQuery would be the PERFECT addition to jQuery's css
  parsing
  possiblities.
  
  What do you think?
  
  --
  Paul Bakaus
  Web Developer
  
  Hildastr. 35
  79102 Freiburg
  
  ___
  jQuery mailing list
  discuss@jquery.com mailto:discuss@jquery.com
  http://jquery.com/discuss/
  
  
  
  
 
 ___
 jQuery mailing list
 discuss@jquery.com mailto: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/

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


Re: [jQuery] $(form.elements) fails (in IE this time)

2006-11-06 Thread Jörn Zaefferer
 If it doesn't break anything else, then we should probably get this
 and the fix for #164 in SVN and get another point release out the
 door.

I'm curious if this stuff fixes the weird errors that occured in the test suite 
somewhere since 1.0.2. Would be great if that is solved, too.

--
Jörn Zaefferer

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

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


Re: [jQuery] New way of animating

2006-11-06 Thread Christof Donat
Hi,

 but now my own killer feature :D

 3.) $(#mydiv).animateClass(oldClass, newClass); -or-
 $(#mydiv).animateClass(newClass);

That would be nice, but what about this:

.myFirstClass {
display:inline;
background-color:#00;
}
.mySecondClass {
display:block;
background-color:#ff;
}

$(#mydiv).animateClass('myFirstClass', 'mySecondClass');

What will hapen?

Another thing: after the animation has finished, will the element only have 
the style of the new class or will it be of the new class. Will it still be 
of the old class? When does that change if it does?

Christof

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Klaus Hartl
Jörn Zaefferer schrieb:
 So show would have either a Number value (delay) or a String like onclick 
 or click. click would be intersting, then I could implement that like 
 this:
 
 [...]
 if(typeof settings.show == String)
   this[settings.show](show);
 [...]

Interesting how ideas evolve at the same time... I recently had to do this:

var handler = $.browser.msie ? 'keydown' : 'focus';

$(document)[handler](function(e) {
 // handle event
});

That was much shorter than duplicating the code and having a branch like 
that:

if () {
 $(document).keydown( ... );
} else {
 $(document).focus( ... )
}


Yeah, JavaScript rocks! Still learning...


-- Klaus




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


Re: [jQuery] New way of animating

2006-11-06 Thread Klaus Hartl
Rey Bango schrieb:
 Hi Paul,
 
 This is the type of stuff that I think would be OOO helpful in a 
 tutorial or demo page. Like a best practices type of thing. I recently 
 spent a lot of time talking to John about how to get the project more 
 exposure and one of the things we threw out was getting more examples of 
 coding practices on the site.
 
 Would you mind terribly jotting down some of these examples? I think 
 they'd really help new users transition to jQuery.
 
 Let me know.
 
 Rey...


Hey, not they I do not appreciate your marketing efforts, but jQuery 
is so good, it will make its way anyway. There's not a single person I 
know, that is not enthusiastic about it after having used it for the 
first time...



-- Klaus

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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
Hi Klaus,

Man, I totally agree with you. I was hooked the first time I used it as 
well and my friends have gone through the same thing.

What I'm trying to do is get people to use it for the first time and 
when they do, ease their transition as much as possible.

Rey...

 Hey, not they I do not appreciate your marketing efforts, but jQuery 
 is so good, it will make its way anyway. There's not a single person I 
 know, that is not enthusiastic about it after having used it for the 
 first time...
 
 
 
 -- Klaus
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


[jQuery] Writing documentation, jQuery style?

2006-11-06 Thread Derrek
Is there some documentation describing the metatags within the jQuery documentation? I want to write some documentation for a project at work but in the jQuery style. Also, are there any handy tools out there to turn this jQuery documentation into something more readable? It'd be nice to have some basic HTML pages or something that is the JavaDoc-style.
Thanks,Derrek
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Klaus Hartl
Jörn Zaefferer schrieb:
 Yeah, JavaScript rocks! Still learning...
 
 Yep. Just after writing the answer to your proposal, I modified it to this:
 
 options = $.extend({
   [...]
   event: mouseover,
   [...]
 }, options || {});
 
 [...]
 .bind(options.event, bind); // bind is the callback to handle the mouseover 
 or click or whatever event
 
 Now you could basically bind the tooltip showing to whatever event you can 
 think of. Dunno what else then mouseover and click make any sense...

The focus event! Finally a tooltip solution that would be device 
independent! Yeah!


-- Klaus

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


Re: [jQuery] New way of animating

2006-11-06 Thread Dan Atkinson

That's what I'm getting at though...

The stuff on that site... It's been done in jQuery already.

Still, I suppose if you make enough examples of everythin everyone else has
done, and then throw jQuery's own killer features, then we might get more
converts! :D

There's plenty of cool stuff out there that we should push more and more.

Like this, that I've been trying to do some work on for a few days (p.s.
it's knackered right now):
http://www.nabble.com/file/3990/test.zip test.zip 


Rey Bango-2 wrote:
 
 Well, I guess we disagree again.
 
 In my opinion, if someone has created something very cool, then I don't 
 see why people shouldn't try to replicate it using their favorite library.
 
 In this case, if Paul created a page showing how this could be done in 
 jQuery, it could be put into the demo page and leveraged as a way to 
 show new users how to add those cool types of animations.
 
 Rey...
 
 Dan Atkinson wrote:
 There's a whole page of various plugins that can be attached to jQuery.
 
 http://jquery.com/plugins/
 
 In my opinion, going after individuals who show their work would not only
 be
 a childish 'me too'-ism, but it would be damaging to the reputation of
 jQuery, as it would just make people think that we don't have our own
 ideas,
 so we have to copy those of others.
 
 
 Rey Bango-2 wrote:
 
If all the animation features are in jQuery standalone, then I'm onboard 
with Dan.

What would be good, though, is if a page showing this being done in 
jQuery was created. Paul, are you up for that challenge? :o)

Rey...


Paul Bakaus wrote:


Hey guys,

has someone seen this at ajaxian? Check it out:
http://berniecode.com/writing/animator.html
This is probably the most sexiest animate lib I've ever seen in my
life.
Porting this to jQuery would be the PERFECT addition to jQuery's css
parsing
possiblities.

What do you think?

-- 
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg

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




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


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

-- 
View this message in context: 
http://www.nabble.com/New-way-of-animating-tf2568944.html#a7202332
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] New way of animating

2006-11-06 Thread Jörn Zaefferer
 This is the type of stuff that I think would be OOO helpful in a 
 tutorial or demo page. Like a best practices type of thing. I recently 
 spent a lot of time talking to John about how to get the project more 
 exposure and one of the things we threw out was getting more examples of 
 coding practices on the site.
 
 Would you mind terribly jotting down some of these examples? I think 
 they'd really help new users transition to jQuery.

I think a good approach to this would be better examples in the jQuery API. And 
for that to work, a better presentation of the API. This 
(http://www.mondotondo.com/aercolino/jquery/docs/API/jquery-api2.xml) is an 
interesting starting point. I think a tree naviagtion, with either alphabetical 
or categorized hierachy (selectable via tabs) would be a great start.

It's great that every method of jQuery is documented, but there is still lots 
of room for improvement. Adding examples with more realistic context and on 
that way advertising best-practices could help jQuery users a lot.

--
Jörn Zaefferer

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

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Klaus Hartl
Klaus Hartl schrieb:
 The focus event! Finally a tooltip solution that would be device 
 independent! Yeah!

You should make focus the default!


-- Klaus

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Michael Geary
 From: Paul McLanahan
 
 The only suggestion I have deals with displaying the tips 
 close to the right side of the screen.  You do an excellent 
 job of handling the width of the tip when it is close to the 
 right edge of the window, but if a word is too long inside of 
 the tip it will push outside of the viewable area and cause 
 the horizontal scroll bar to appear.  I would suggest that 
 you attempt to detect that situation and flip the tip so that 
 it shows to the left of the pointer when it is too wide to be 
 completely within the window.

Great idea, and it's not too hard to do, like on this page for example:

http://denverpost.zvents.com/venues/show/13197

When you hover over any of the map pins, a tooltip-like window appears. If
there isn't room on the right, it goes on the left instead. Similarly, if
there isn't enough room below the pin, the tip moves up. (But I just noticed
a bug - I meant to move the tip so that its bottom lines up with the bottom
of the little box around the pin, like the way the top of the tip lines up
with the top of the box normally - but it's badly misaligned. It works OK in
the horizontal direction.)

All I had to do to make this work was first generate the tip in its normal
bottom-right position and then see if it overflows the visible area of the
window. If it does, then I move it to the left or up. The tip window's
offsetHeight and offsetWidth are available at this point, and the browser
won't actually render the tip window until the JavaScript code stops
executing - so it does no harm to first generate it in one position and then
move it to another.

I use this code to get the viewport (visible rectangle of the window). I
think I saw similar code in one of the jQuery plugins:

viewport: function() {
var e = document.documentElement || {},
b = document.body || {},
w = window;

return {
x: w.pageXOffset || e.scrollLeft || b.scrollLeft || 0,
y: w.pageYOffset || e.scrollTop || b.scrollTop || 0,
cx: min( e.clientWidth, b.clientWidth, w.innerWidth ),
cy: min( e.clientHeight, b.clientHeight, w.innerHeight )
};

function min() {
var v = Infinity;
for( var i = 0;  i  arguments.length;  i++ ) {
var n = arguments[i];
if( n  n  v ) v = n;
}
return v;
}
}

In the returned viewport, cx and cy are the width and height (old habit of
using Windows naming conventions here!), and x and y are of course the left
and top. Then, after generating the popup window, I compare its offsetLeft,
offsetTop, offsetWidth, and offsetHeight against the viewport and move it as
needed.

-Mike


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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
Hi Dan,

 Still, I suppose if you make enough examples of everythin everyone else has
 done, and then throw jQuery's own killer features, then we might get more
 converts! :D
 There's plenty of cool stuff out there that we should push more and more.

Yep! See, part of my concern is that it seems that the other libraries 
get a ton more exposure than jQuery does so when someone creates a new 
whiz-bang page using moo or Prototype, it gives a ton of press to those 
libraries even though in many cases, jQuery has had those features for 
some time. So I think its important to empathize, in some tangible 
fashion, these capabilities especially to new visitors. I think the 
folks at Scriptaculous have done a really good job of this with their 
new site.

Going along your comments, I think you're right that we need to clearly 
delineate whats already built-in to jQuery, what can be enhanced via a 
plugin, and what should be added to some best practices/demo page so 
that we're not constantly reinventing the wheel. I would just hate for 
someone to come by and say, Well, jQuery doesn't seem to have this 
animation capability that I saw on Ajaxian simply because its not 
obvious to them from what they see on the site.

Rey...

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


[jQuery] append quicktime plugin

2006-11-06 Thread burt bacharach
hi,i'm trying to append a quicktime movie using jquery.$(#qtmoviediv).append('embed src="" qtsrc=rtsp://some.streaming.content/movie.mov pluginspage=
http://www.apple.com/quicktime/download/ autoplay=true type=video/quicktime width=320 height=240 loop=false controller=false name=qtmovie enablejavascript=true /embed').fadeIn(slow, function () {startCounter();});
this is fine for firefox, but .append with an object-tag (for ie) doesn't work.$(#qtmoviediv).append('object id=qtmovie width=320 height=240 classid="" codebase=""
http://www.apple.com/qtactivex/qtplugin.cabparam name=src value=picture.jpgparam name=qtsrc value=rtsp://some.streaming.content/movie.movparam name=autoplay value=trueparam name=controller value=falseparam name=name value=qtmovieparam name=enablejavascript value=true/object').fadeIn(slow, function () {startCounter();});
so does anybody knows how to create an object element ?thanks,bacca
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] append quicktime plugin

2006-11-06 Thread Mike Alsup
 i'm trying to append a quicktime movie using jquery.

Use $().html().

I have a plugin for this if you're interested.

Mike

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


Re: [jQuery] Plugin Release: Tooltip

2006-11-06 Thread Karl Swedberg
On Nov 6, 2006, at 11:59 AM, Michael Geary wrote:
 Great idea, and it's not too hard to do... [see full email below]

Well done, Michael! Wow, I have so much to learn.

On Nov 6, 2006, at 9:51 AM, Jörn Zaefferer wrote:
 Your suggestion of flipping the tooltip would be the best solution,  
 but not easy to implement. I should ask Karl Swedberg for his  
 experience on that topic, I think he and Rey already (tried to)  
 solve that for their jTip adoption.

Actually, Cody's jTip had the flipping part in it before I got my  
hands on it, so credit go to him. :)

I just added a couple adjustments:

1 If the JTip flips to the left of the element hovered over, and if  
the JTip is too wide to fit entirely between the linked item and the  
left side of the viewportt, its width decreases to the widest  
possible without having any of it cut off.
2. The JTip position moves up if it's initially cut off at the bottom  
of the viewable area, and moves down to the top of viewable area if  
its height is greater than that of the viewport.

The source file is here:
http://test.learningjquery.com/scripts/jtip.js

My part of the code is a little messy (I'm still learning), but it  
might still help you get something done a bit quicker if you decide  
to pursue this.

Karl

___
Karl Swedberg
www.englishrules.com
www.learningjquery.com

On Nov 6, 2006, at 11:59 AM, Michael Geary wrote:
 Great idea, and it's not too hard to do, like on this page for  
 example:

 http://denverpost.zvents.com/venues/show/13197

 When you hover over any of the map pins, a tooltip-like window  
 appears. If
 there isn't room on the right, it goes on the left instead.  
 Similarly, if
 there isn't enough room below the pin, the tip moves up. (But I  
 just noticed
 a bug - I meant to move the tip so that its bottom lines up with  
 the bottom
 of the little box around the pin, like the way the top of the tip  
 lines up
 with the top of the box normally - but it's badly misaligned. It  
 works OK in
 the horizontal direction.)

 All I had to do to make this work was first generate the tip in its  
 normal
 bottom-right position and then see if it overflows the visible area  
 of the
 window. If it does, then I move it to the left or up. The tip window's
 offsetHeight and offsetWidth are available at this point, and the  
 browser
 won't actually render the tip window until the JavaScript code stops
 executing - so it does no harm to first generate it in one position  
 and then
 move it to another.

 I use this code to get the viewport (visible rectangle of the  
 window). I
 think I saw similar code in one of the jQuery plugins:

 viewport: function() {
 var e = document.documentElement || {},
 b = document.body || {},
 w = window;

 return {
 x: w.pageXOffset || e.scrollLeft || b.scrollLeft || 0,
 y: w.pageYOffset || e.scrollTop || b.scrollTop || 0,
 cx: min( e.clientWidth, b.clientWidth, w.innerWidth ),
 cy: min( e.clientHeight, b.clientHeight, w.innerHeight )
 };

 function min() {
 var v = Infinity;
 for( var i = 0;  i  arguments.length;  i++ ) {
 var n = arguments[i];
 if( n  n  v ) v = n;
 }
 return v;
 }
 }

 In the returned viewport, cx and cy are the width and height (old  
 habit of
 using Windows naming conventions here!), and x and y are of course  
 the left
 and top. Then, after generating the popup window, I compare its  
 offsetLeft,
 offsetTop, offsetWidth, and offsetHeight against the viewport and  
 move it as
 needed.

 -Mike


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


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


Re: [jQuery] stripping out tags...

2006-11-06 Thread Dave Methvin

 
 div id=someId
label for=someForsome spantext/span here/label /div

 I want to remove the label tag and preserve what it contains.
 But while I was writing my question, I came up with this:
 
 jQuery.fn.stripOut = function (el) {
 $(this).each( function(){
 $(this).find(el).parent().html(($(this).find(el).html()));
 })
 }

How about an .unwrap method to do the opposite of .wrap?

jQuery.fn.unwrap = function (el) {
return this.each( function(){
  $(this.childNodes).appendTo(this.parentNode);
});
};

 $('label').unwrap().remove();

I guess it's really more like .dumpChildrenOnGrandparent, but .unwrap is
shorter. :)


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


Re: [jQuery] New way of animating

2006-11-06 Thread Karl Swedberg
On Nov 6, 2006, at 11:29 AM, Rey Bango wrote:
 Hi Paul,

 This is the type of stuff that I think would be OOO helpful in a
 tutorial or demo page. Like a best practices type of thing. I recently
 spent a lot of time talking to John about how to get the project more
 exposure and one of the things we threw out was getting more  
 examples of
 coding practices on the site.

 Would you mind terribly jotting down some of these examples? I think
 they'd really help new users transition to jQuery.

Please forgive the self-promotion, but these are the kinds of thing  
I'm also trying to do on learningjquery.com, and I (again) warmly  
welcome anyone who would like to author one or more tutorials for it  
or offer suggestions.

Of course, adding more of this to the official jquery.com site would  
be great, too. Still, IMO the more jQuery love out there, the better.  
Third-party sites such as Cody Lindley's jQuery examples page and 15  
Days of jQuery did as much as anything to get me hooked on jQuery.

I'm currently working on these topics (in roughly this order):
- How to Get Anything You Want (DOM Traversing)
- Multi-Level Drop-Down Menus
- jQuery Chaining
- Basic Ajax Form Submission
- Create a Basic Plugin
- Collapsible Details Using Definition Lists

and Brandon Aaron has been working on Populating a Select Menu with  
JSON and AJAX.

Cheers,
Karl
___
Karl Swedberg
www.englishrules.com
www.learningjquery.com


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


Re: [jQuery] Unicode (I love Unicode)

2006-11-06 Thread Ⓙⓐⓚⓔ
Andy, it's just unicode...  your e-mail and your web browser don't do
unicode right what kind of programs and system are you using?

I thought XP did UNICODE EVERYWHERE... are there fonts missing on your
system? Is it an add-in?

On my macs it all just works. I've noticed that some PCs show my
e-mail name  as (J)(a)(k)(e) instead of Ⓙⓐⓚⓔ (pretty circled letters
from the netherworld of utf), but I think that is just a bad font
choice, my signature is a combo of my name in hebrew, english, and
some Asian utf chars that look like Jake.

Is there a  route to help PC people make the full transition from
ascii-7 to unicode?

-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ

On 11/6/06, Andy Matthews [EMAIL PROTECTED] wrote:
 Yep...

 Your name, and the stars, come across as a series of boxes.

 !//--
 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 way of animating

2006-11-06 Thread Rey Bango
Hey Karl! Yep, your site is invaluable. You really do have some great 
tutorials on there and I think expanding it out via your submissions and 
those from anyone else is an awesome idea.

Rey...

Karl Swedberg wrote:
 On Nov 6, 2006, at 11:29 AM, Rey Bango wrote:
 
Hi Paul,

This is the type of stuff that I think would be OOO helpful in a
tutorial or demo page. Like a best practices type of thing. I recently
spent a lot of time talking to John about how to get the project more
exposure and one of the things we threw out was getting more  
examples of
coding practices on the site.

Would you mind terribly jotting down some of these examples? I think
they'd really help new users transition to jQuery.
 
 
 Please forgive the self-promotion, but these are the kinds of thing  
 I'm also trying to do on learningjquery.com, and I (again) warmly  
 welcome anyone who would like to author one or more tutorials for it  
 or offer suggestions.
 
 Of course, adding more of this to the official jquery.com site would  
 be great, too. Still, IMO the more jQuery love out there, the better.  
 Third-party sites such as Cody Lindley's jQuery examples page and 15  
 Days of jQuery did as much as anything to get me hooked on jQuery.
 
 I'm currently working on these topics (in roughly this order):
 - How to Get Anything You Want (DOM Traversing)
 - Multi-Level Drop-Down Menus
 - jQuery Chaining
 - Basic Ajax Form Submission
 - Create a Basic Plugin
 - Collapsible Details Using Definition Lists
 
 and Brandon Aaron has been working on Populating a Select Menu with  
 JSON and AJAX.
 
 Cheers,
 Karl
 ___
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 

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


Re: [jQuery] append quicktime plugin

2006-11-06 Thread jyl
 i'm trying to append a quicktime movie using jquery.

 Use $().html().

 I have a plugin for this if you're interested.

 Mike

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


So since he wants to do append, it'd be

  $(#qtDiv).html($(#qtDiv).html() . $newHTML)

right?

--Jacob



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


Re: [jQuery] Unicode (I love Unicode)

2006-11-06 Thread Dave Methvin
 
 Andy, it's just unicode...  your e-mail and your web browser
 don't do unicode right 

Neither does Nabble, then. This is what I see in my mail client as well.
Maybe the mailing list software is doing it before it arrives at Nabble.

http://www.nabble.com/JQuery-f15494.html

 Is there a  route to help PC people make the full transition
 from ascii-7 to unicode?

Absolutely, it's the same route that gets people to make the transition from
IE5.5 to IE7 or FF2. Wait five or six years and the problem is mostly
solved.  :(



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


Re: [jQuery] append quicktime plugin

2006-11-06 Thread Mike Alsup
   $(#qtDiv).html($(#qtDiv).html() . $newHTML)

Yes, except with Javascript syntax instead of php.  :-)

var qtHtml = object.;
var $qtDiv = $('#qtDiv');
$qtDiv.html($qtDiv.html() + qtHtml);

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


Re: [jQuery] Unicode (I love Unicode)

2006-11-06 Thread Ⓙⓐⓚⓔ
Nabble doesn't nibble at my nybbles. (IE they don't mess with the
unicode and it works!)
FF 2.0 Mac shows just fine.


On 11/6/06, Dave Methvin [EMAIL PROTECTED] wrote:

  Andy, it's just unicode...  your e-mail and your web browser
  don't do unicode right

 Neither does Nabble, then. This is what I see in my mail client as well.
 Maybe the mailing list software is doing it before it arrives at Nabble.

 http://www.nabble.com/JQuery-f15494.html

  Is there a  route to help PC people make the full transition
  from ascii-7 to unicode?

 Absolutely, it's the same route that gets people to make the transition from
 IE5.5 to IE7 or FF2. Wait five or six years and the problem is mostly
 solved.  :(



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



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


Re: [jQuery] Unicode (I love Unicode)

2006-11-06 Thread Dave Methvin
 Nabble doesn't nibble at my nybbles. (IE they don't mess with
 the unicode and it works!) FF 2.0 Mac shows just fine.

You're right, I think it's your earlier guess that we don't have all the
world's fonts installed. I think it is best to assume that users have only a
basic set of fonts, and not the entire set of Unicode glyphs.

Windows has a font download option but I have turned it off. I don't see any
point in installing Thai or Chinese since I can't read it anyway; the little
rectangular boxes make just as much sense and take up less memory. There was
a security vulnerability in Windows last year having to do with automatic
font download (MS06-002) so you can bet that many companies have turned it
off as well.



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


Re: [jQuery] Scrolling to the bottom of a page

2006-11-06 Thread sd

Okay...

That's a beginning...



But I want to make a chat. So if you scroll up and already down, it

should fix the bottom, when the scroll bar is bottom-most.



Any idea?



Am 6.11.2006 schrieb Sean O [EMAIL PROTECTED]:





Interface's ScrollTo should work nicely (and aesthetically) for that:

http://interface.eyecon.ro/demos/ifxscrollto.html



http://interface.eyecon.ro/





SEAN O







sd-11 wrote:





 Hi,







 how to scroll always to the bottom of a page with jquery?







 Thank you.



 ___

 jQuery mailing list

 discuss@jquery.com

 http://jquery.com/discuss/







--

View this message in context: http://www.nabble.com/Scrolling-to-the-bottom-
of-a-page-tf2578618.html#a7192370

Sent from the JQuery mailing list archive at Nabble.com.





___

jQuery mailing list

discuss@jquery.com

http://jquery.com/discuss/

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


Re: [jQuery] Scrolling to the bottom of a page

2006-11-06 Thread Bryan Buchs
Sounds like you need CSS help, not jQuery help.

Try googling css position fixed.





[EMAIL PROTECTED] wrote:
 Okay...
 
 That's a beginning...
 
 
 
 But I want to make a chat. So if you scroll up and already down, it
 
 should fix the bottom, when the scroll bar is bottom-most.
 
 
 
 Any idea?
 
 
 
 Am 6.11.2006 schrieb Sean O [EMAIL PROTECTED]:
 
 
 
 
 Interface's ScrollTo should work nicely (and aesthetically) for that:
 
 http://interface.eyecon.ro/demos/ifxscrollto.html
 
 
 http://interface.eyecon.ro/
 
 
 
 
 SEAN O
 
 
 
 
 sd-11 wrote:
 
 
 
 Hi,
 
 
 
 
 how to scroll always to the bottom of a page with jquery?
 
 
 
 
 Thank you.
 
 
 ___
 
 jQuery mailing list
 
 discuss@jquery.com
 
 http://jquery.com/discuss/
 
 
 
 
 --
 
 View this message in context: http://www.nabble.com/Scrolling-to-the-bottom-
 of-a-page-tf2578618.html#a7192370
 
 Sent from the JQuery mailing list archive at Nabble.com.
 
 
 
 ___
 
 jQuery mailing list
 
 discuss@jquery.com
 
 http://jquery.com/discuss/
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

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


[jQuery] jquery incompatible with adsense?

2006-11-06 Thread Mark D.B.D
Hi all,When I finished my little project with jquery I decided to add my adsense code. After this I saw there is something that makes jquery incompatible with the adsense script. I don't know what it is so I created a little test page so you all can check it:
http://www.markdbd.com/proyectos/jquery_test/Just click on the image to get the error, I think it only happens on firefox. I am using the thinkbox plugin but If I am right the bug is in 
jquery.js.Regards,-- --Mark D.B.Dhttp://www.markdbd.com
[EMAIL PROTECTED]--
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Scrolling to the bottom of a page

2006-11-06 Thread sd

I think this has nothing to do with CSS...



Look, if you have content on a page, which will grow in the direction of

the bottom, than you get a large range to scroll. JQuery should scroll

automaticly at the lowest point of the page ( to the bottom ). If the

user wants to read something again, let me say in the middle of the

page, then he should be able to scroll to the position.







Am 6.11.2006 schrieb Bryan Buchs [EMAIL PROTECTED]:



Sounds like you need CSS help, not jQuery help.



Try googling css position fixed.











[EMAIL PROTECTED] wrote:

 Okay...



 That's a beginning...







 But I want to make a chat. So if you scroll up and already down, it



 should fix the bottom, when the scroll bar is bottom-most.







 Any idea?







 Am 6.11.2006 schrieb Sean O [EMAIL PROTECTED]:









 Interface's ScrollTo should work nicely (and aesthetically) for that:



 http://interface.eyecon.ro/demos/ifxscrollto.html





 http://interface.eyecon.ro/





 



 SEAN O









 sd-11 wrote:







 Hi,









 how to scroll always to the bottom of a page with jquery?









 Thank you.





 ___



 jQuery mailing list



 discuss@jquery.com



 http://jquery.com/discuss/









 --



 View this message in context: http://www.nabble.com/Scrolling-to-the-bott
om-

 of-a-page-tf2578618.html#a7192370



 Sent from the JQuery mailing list archive at Nabble.com.







 ___



 jQuery mailing list



 discuss@jquery.com



 http://jquery.com/discuss/



 ___

 jQuery mailing list

 discuss@jquery.com

 http://jquery.com/discuss/



___

jQuery mailing list

discuss@jquery.com

http://jquery.com/discuss/

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


Re: [jQuery] jquery incompatible with adsense?

2006-11-06 Thread Luke Lutman
I had a similar problem, Mark.

Upgrading to the latest revision of jQuery (522 at the time) solved the 
problem :-)

Luke

Mark D.B.D wrote:
 Hi all,
 
 When I finished my little project with jquery I decided to add my 
 adsense code. After this I saw there is something that makes jquery 
 incompatible with the adsense script. I don't know what it is so I 
 created a little test page so you all can check it:
 
 http://www.markdbd.com/proyectos/jquery_test/
 
 Just click on the image to get the error, I think it only happens on 
 firefox. I am using the thinkbox plugin but If I am right the bug is in 
 jquery.js.
 
 Regards,
 
 -- 
 --
 Mark D.B.D
 http://www.markdbd.com
 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 --
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/


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


Re: [jQuery] New way of animating

2006-11-06 Thread Dragan Krstic
Can we make biz-wang-ultra-boom-bang-crash site, for jQuery, with tones of 
cool features, animations, etc...
- Original Message - 
From: Rey Bango [EMAIL PROTECTED]
To: jQuery Discussion. discuss@jquery.com
Sent: Monday, November 06, 2006 7:07 PM
Subject: Re: [jQuery] New way of animating


 Hey Karl! Yep, your site is invaluable. You really do have some great
 tutorials on there and I think expanding it out via your submissions and
 those from anyone else is an awesome idea.

 Rey...

 Karl Swedberg wrote:
 On Nov 6, 2006, at 11:29 AM, Rey Bango wrote:

Hi Paul,

This is the type of stuff that I think would be OOO helpful in a
tutorial or demo page. Like a best practices type of thing. I recently
spent a lot of time talking to John about how to get the project more
exposure and one of the things we threw out was getting more
examples of
coding practices on the site.

Would you mind terribly jotting down some of these examples? I think
they'd really help new users transition to jQuery.


 Please forgive the self-promotion, but these are the kinds of thing
 I'm also trying to do on learningjquery.com, and I (again) warmly
 welcome anyone who would like to author one or more tutorials for it
 or offer suggestions.

 Of course, adding more of this to the official jquery.com site would
 be great, too. Still, IMO the more jQuery love out there, the better.
 Third-party sites such as Cody Lindley's jQuery examples page and 15
 Days of jQuery did as much as anything to get me hooked on jQuery.

 I'm currently working on these topics (in roughly this order):
 - How to Get Anything You Want (DOM Traversing)
 - Multi-Level Drop-Down Menus
 - jQuery Chaining
 - Basic Ajax Form Submission
 - Create a Basic Plugin
 - Collapsible Details Using Definition Lists

 and Brandon Aaron has been working on Populating a Select Menu with
 JSON and AJAX.

 Cheers,
 Karl
 ___
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com


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


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


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


Re: [jQuery] New way of animating

2006-11-06 Thread Stephen Woodbridge
I can't speak to most of these issues, but I would like to point that 
for myself, learning works best by taking something that exists and 
rewriting it into jQuery. This allows me to not have to think about the 
existing application, but rather focus on get it working or getting it 
right in jQuery.

Getting a thoughtful (not judgmental) critic and suggestions from more 
knowledge users is also very useful. I often get so focused on what I am 
trying to get working, I totally miss that there was a different simpler 
way to solve the problem.

jQuery is relatively new, and many of the things that some of the more 
mature packages have are not use available in jQuery, (for the good or 
bad), so I applaud anyone that has time and effort and a willingness to 
create and offer new tools. The free market place of plugins will 
determine which are more useful.

-Steve

Dan Atkinson wrote:
 There's a whole page of various plugins that can be attached to jQuery.
 
 http://jquery.com/plugins/
 
 In my opinion, going after individuals who show their work would not only be
 a childish 'me too'-ism, but it would be damaging to the reputation of
 jQuery, as it would just make people think that we don't have our own ideas,
 so we have to copy those of others.
 
 
 Rey Bango-2 wrote:
 If all the animation features are in jQuery standalone, then I'm onboard 
 with Dan.

 What would be good, though, is if a page showing this being done in 
 jQuery was created. Paul, are you up for that challenge? :o)

 Rey...

 Paul Bakaus wrote:

 Hey guys,

 has someone seen this at ajaxian? Check it out:
 http://berniecode.com/writing/animator.html
 This is probably the most sexiest animate lib I've ever seen in my life.
 Porting this to jQuery would be the PERFECT addition to jQuery's css
 parsing
 possiblities.

 What do you think?

 -- 
 Paul Bakaus
 Web Developer
 
 Hildastr. 35
 79102 Freiburg

 ___
 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] return this.each

2006-11-06 Thread Michael Geary
 From: Simon Corless
 Thanks for the help Mike, it's starting to come together. 
 I've been testing it just now.
 
 If I do use return this.each() then how do I reference the 
 jQuery methods? without this.hover() etc? Obviously as this 
 is no longer what I am expecting this.hover (as you say) 
 fails. So do I use my 'self' variable or another way?

If you are calling each(), that means your plugin may operate on more than
one element, right? If you do var self = this; outside the each() call,
that is a reference to the entire jQuery object - an array of all the DOM
elements. The reason you would call each() is to operate on those elements
one by one. So in most cases that 'self' isn't what you want inside the
each() inner function.

In that inner function 'this' is the individual DOM element, so if you want
a jQuery object for that element, use $(this).

Let's try some more descriptive names instead of self and this:

(function( $ ) {
$.fn.twiddle = function() {
var $all = this;
$all.each( function() {
var element = this, $element = $(element);
// Now we have:
//   $all - jQuery obect for all matching elements
//   $element - jQuery obect for a single element
//   element - a single element itself
});
};
})( jQuery );

Now you can write the entire plugin using meaningful names. In practice, I
tend to use shorter names like e and $e instead of element and $element, but
I used the longer ones here to make it more descriptive.

Remember that if the plugin doesn't need to work on the individual DOM
elements but only uses jQuery methods on the whole collection, then you
don't need an each() loop at all.

Contrast a plugin that sets all matching elements to the same random color:

(function( $ ) {
$.fn.twiddle = function() {
var $all = this;
$all.background( randomColor() );
};
})( jQuery );

vs. a plugin that sets each matching element to a different random color:

(function( $ ) {
$.fn.twiddle = function() {
$all.each( function() {
var element = this, $element = $(element);
$element.background( randomColor() );
});
};
})( jQuery );

Note the use of the $ prefix to indicate that a variable is a jQuery object,
and the use of matching names with and without the $ when you have both a
DOM element and a matching jQuery object for that element only. A similar
use of this pattern is:

var $foo = $('.foo'), foo = $foo[0];

This is for typical non-plugin code where you're starting with a query.
Instead of writing code like this:

$('.foo').zip();
// more code
$('.foo').zoom();
// more code
$('.foo').fly();

You'd write:

var $foo = $('.foo');
$foo.zip();
// more code
$foo.zoom();
// more code
$foo.fly();

In this case we're not using any DOM methods, so we only use $foo and not
foo.

 I thought I saw someone just using 
 .hover() (without any prefix) but this just fails.

You probably saw code like:

$('.foo')
.zip()
.zoom()
.fly();

That's a single line of code split into multiple lines. It's the same as:

$('.foo').zip().zoom().fly();

 I don't fully understand the difference, currently I don't 
 use any dom methods I just use jQuery (I partly thought
 that was the point of it? - Although I realise sometimes
 you need to go deeper).

jQuery doesn't try to provide its own equivalent of every possible DOM
property and method, so it's pretty handy to be able to mix and match when
you need to.

 Basically I have 3 internal functions defined in two ways as:
 
 nextItem = function ()
 or
 function pause()
 
 Am I right in thinking that nextItem() could be called 
 through a jQuery chain and that pause() can only be called 
 internally from my plugin? Or are they both the same just 
 written differently?

Those are just different ways of writing functions - they have little or
nothing to do with how a function can be used.

For example, these are essentially identical, creating functions in the
current scope:

   var foo = function(){};

   function foo(){}

If I left off the var, the first one would create a global function:

   foo = function(){};

That is usually a mistake, as it is in your code - your nextItem should be
either:

   var nextItem = function()...

or:

   function nextItem()...

The latter would be more consistent with the rest of your code, so that's
what I'd use.

Another coding tip or two...

You have several places with code like this:

   settings['blank']

That's OK, but you can substitute the simpler:

   settings.blank

I would change this code:

if (items[i]['link']) {
self.html(a href=\\ + items[i]['item'] + /a);
} else {
self.html(items[i]['item']);
}

to:

var item = items[i];
if (item.link) {

[jQuery] (no subject)

2006-11-06 Thread Steve Reid
why doesn't this work:

$('#text-field').val(this.name);

when this does:

$('#text-field).click( function() { alert(this.name); } );

? did i find a bug?also: what does 'this' refer to? the jquery object, right?
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


[jQuery] this.name

2006-11-06 Thread Steve Reid
why doesn't this work:

$('#text-field').val(this.name);

when this does:

$('#text-field).click( function() { alert(this.name); } );
  ? did i find a bug?

also: what does 'this' refer to? the jquery object, right?

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


Re: [jQuery] New way of animating

2006-11-06 Thread Paul Bakaus
Hey again,Rey: I'm absolutely with you with the idea of pushing jQuery with tutorials and examples. I myself love jQuery and I am starting to use in in commercial projects, too, but many of my co-workers are very interested in examples.
Of course, checking out demos of plugins is always a great idea. But I would also welcome more migration sheets of different frameworks like the one that was posted in jQuery's blog recently.By the way, I perfectly know well that jQuery's build-in animation method should not be replaced, this is were some people may get a wrong idea in my first email in this thread.
I just wanted to have this extended functionality for myself, so as you said Rey, I will go ahead and create a demo / tutorial like plugin and post it again. This plugin will feature the method like described my Christof, because it's very interesting:
When doing $(#mydiv).animateClass('myFirstClass', 'mySecondClass'), the object is transparently cloned at opacity 0.0001 or visibility hidden with the given new class, then the style of this clone is computed, then a diff is made between the old computed style properties and the new ones, and finally our beloved animate() function takes care of the animation, then sets the class with className and removes the animated styles again (because we don't need them anymore if the class is set on the original). harhar :)
2006/11/6, Christof Donat [EMAIL PROTECTED]:
Hi, but now my own killer feature :D 3.) $(#mydiv).animateClass(oldClass, newClass); -or- $(#mydiv).animateClass(newClass);That would be nice, but what about this:
.myFirstClass {display:inline;background-color:#00;}.mySecondClass {display:block;background-color:#ff;}$(#mydiv).animateClass('myFirstClass', 'mySecondClass');
What will hapen?Another thing: after the animation has finished, will the element only havethe style of the new class or will it be of the new class. Will it still beof the old class? When does that change if it does?
Christof___jQuery mailing listdiscuss@jquery.comhttp://jquery.com/discuss/
-- Paul BakausWeb DeveloperHildastr. 3579102 Freiburg
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] this.name

2006-11-06 Thread Michael Geary
 why doesn't this work:
 
 $('#text-field').val(this.name);

What is this? You haven't given it a value. So it depends on the context
of this code. If the code is not in an object method, then this is the
window object.

 when this does:
 
 $('#text-field).click( function() { alert(this.name); } );
   ? did i find a bug?
 
 also: what does 'this' refer to? the jquery object, right?

Now your reference to this is inside a function, specifically an event
handler. jQuery follows the same practice as the native DOM: inside an event
handler, this is the DOM element associated with the event. That's why you
can do this.name.

-Mike


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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
Feel free to offer something up Dragan. John's a fairly receptive to 
anything that will benefit the project.

Rey...

Dragan Krstic wrote:
 Can we make biz-wang-ultra-boom-bang-crash site, for jQuery, with tones of 
 cool features, animations, etc...
 - Original Message - 
 From: Rey Bango [EMAIL PROTECTED]
 To: jQuery Discussion. discuss@jquery.com
 Sent: Monday, November 06, 2006 7:07 PM
 Subject: Re: [jQuery] New way of animating
 
 
 
Hey Karl! Yep, your site is invaluable. You really do have some great
tutorials on there and I think expanding it out via your submissions and
those from anyone else is an awesome idea.

Rey...

Karl Swedberg wrote:

On Nov 6, 2006, at 11:29 AM, Rey Bango wrote:


Hi Paul,

This is the type of stuff that I think would be OOO helpful in a
tutorial or demo page. Like a best practices type of thing. I recently
spent a lot of time talking to John about how to get the project more
exposure and one of the things we threw out was getting more
examples of
coding practices on the site.

Would you mind terribly jotting down some of these examples? I think
they'd really help new users transition to jQuery.


Please forgive the self-promotion, but these are the kinds of thing
I'm also trying to do on learningjquery.com, and I (again) warmly
welcome anyone who would like to author one or more tutorials for it
or offer suggestions.

Of course, adding more of this to the official jquery.com site would
be great, too. Still, IMO the more jQuery love out there, the better.
Third-party sites such as Cody Lindley's jQuery examples page and 15
Days of jQuery did as much as anything to get me hooked on jQuery.

I'm currently working on these topics (in roughly this order):
- How to Get Anything You Want (DOM Traversing)
- Multi-Level Drop-Down Menus
- jQuery Chaining
- Basic Ajax Form Submission
- Create a Basic Plugin
- Collapsible Details Using Definition Lists

and Brandon Aaron has been working on Populating a Select Menu with
JSON and AJAX.

Cheers,
Karl
___
Karl Swedberg
www.englishrules.com
www.learningjquery.com


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


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

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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
Great Paul! Look forward to seeing bud.

Rey...

Paul Bakaus wrote:
 Hey again,
 
 Rey: I'm absolutely with you with the idea of pushing jQuery with 
 tutorials and examples. I myself love jQuery and I am starting to use in 
 in commercial projects, too, but many of my co-workers are very 
 interested in examples.
 
 Of course, checking out demos of plugins is always a great idea. But I 
 would also welcome more migration sheets of different frameworks like 
 the one that was posted in jQuery's blog recently.
 
 By the way, I perfectly know well that jQuery's build-in animation 
 method should not be replaced, this is were some people may get a wrong 
 idea in my first email in this thread.
 
 I just wanted to have this extended functionality for myself, so as you 
 said Rey, I will go ahead and create a demo / tutorial like plugin and 
 post it again. This plugin will feature the method like described my 
 Christof, because it's very interesting:
 
 When doing $(#mydiv).animateClass(
 'myFirstClass', 'mySecondClass'), the object is transparently cloned at 
 opacity 0.0001 or visibility hidden with the given new class, then the 
 style of this clone is computed, then a diff is made between the old 
 computed style properties and the new ones, and finally our beloved 
 animate() function takes care of the animation, then sets the class with 
 className and removes the animated styles again (because we don't need 
 them anymore if the class is set on the original). harhar :)
 
 
 2006/11/6, Christof Donat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:
 
 Hi,
 
   but now my own killer feature :D
  
   3.) $(#mydiv).animateClass(oldClass, newClass); -or-
   $(#mydiv).animateClass(newClass);
 
 That would be nice, but what about this:
 
 .myFirstClass {
 display:inline;
 background-color:#00;
 }
 .mySecondClass {
 display:block;
 background-color:#ff;
 }
 
 $(#mydiv).animateClass('myFirstClass', 'mySecondClass');
 
 What will hapen?
 
 Another thing: after the animation has finished, will the element
 only have
 the style of the new class or will it be of the new class. Will it
 still be
 of the old class? When does that change if it does?
 
 Christof
 
 ___
 jQuery mailing list
 discuss@jquery.com mailto:discuss@jquery.com
 http://jquery.com/discuss/ http://jquery.com/discuss/
 
 
 
 
 -- 
 Paul Bakaus
 Web Developer
 
 Hildastr. 35
 79102 Freiburg
 
 
 
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/

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


Re: [jQuery] New way of animating

2006-11-06 Thread Rey Bango
Well said, Steve.

Rey

Stephen Woodbridge wrote:
 I can't speak to most of these issues, but I would like to point that 
 for myself, learning works best by taking something that exists and 
 rewriting it into jQuery. This allows me to not have to think about the 
 existing application, but rather focus on get it working or getting it 
 right in jQuery.
 
 Getting a thoughtful (not judgmental) critic and suggestions from more 
 knowledge users is also very useful. I often get so focused on what I am 
 trying to get working, I totally miss that there was a different simpler 
 way to solve the problem.
 
 jQuery is relatively new, and many of the things that some of the more 
 mature packages have are not use available in jQuery, (for the good or 
 bad), so I applaud anyone that has time and effort and a willingness to 
 create and offer new tools. The free market place of plugins will 
 determine which are more useful.
 
 -Steve
 
 Dan Atkinson wrote:
 
There's a whole page of various plugins that can be attached to jQuery.

http://jquery.com/plugins/

In my opinion, going after individuals who show their work would not only be
a childish 'me too'-ism, but it would be damaging to the reputation of
jQuery, as it would just make people think that we don't have our own ideas,
so we have to copy those of others.


Rey Bango-2 wrote:

If all the animation features are in jQuery standalone, then I'm onboard 
with Dan.

What would be good, though, is if a page showing this being done in 
jQuery was created. Paul, are you up for that challenge? :o)

Rey...


Paul Bakaus wrote:


Hey guys,

has someone seen this at ajaxian? Check it out:
http://berniecode.com/writing/animator.html
This is probably the most sexiest animate lib I've ever seen in my life.
Porting this to jQuery would be the PERFECT addition to jQuery's css
parsing
possiblities.

What do you think?

-- 
Paul Bakaus
Web Developer

Hildastr. 35
79102 Freiburg

___
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] Unicode (I love Unicode)

2006-11-06 Thread Ⓙⓐⓚⓔ
if you don't want to play the whole game, MS makes a font that
contains just about all the chars..

ms arial unicode, you get it with office or some other ms apps, and
can be installed anywhere ttf fonts are supported.

I don't speak many of the languages that unicode supports, but
GOOGLE(and others) have helped me translate many times!

On 11/6/06, Dave Methvin [EMAIL PROTECTED] wrote:
  Nabble doesn't nibble at my nybbles. (IE they don't mess with
  the unicode and it works!) FF 2.0 Mac shows just fine.

 You're right, I think it's your earlier guess that we don't have all the
 world's fonts installed. I think it is best to assume that users have only a
 basic set of fonts, and not the entire set of Unicode glyphs.

 Windows has a font download option but I have turned it off. I don't see any
 point in installing Thai or Chinese since I can't read it anyway; the little
 rectangular boxes make just as much sense and take up less memory. There was
 a security vulnerability in Windows last year having to do with automatic
 font download (MS06-002) so you can bet that many companies have turned it
 off as well.



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



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


Re: [jQuery] Tabs plugin 2.0

2006-11-06 Thread Klaus Hartl
Will Arp schrieb:
 Hi Klaus,
 when clicking the Activate third tab
 in your example, the url doesn't change.
 
 Thank you for the great update!
 will

Hi Will, I have now fixed that as well.


-- Klaus

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


[jQuery] New jQuery plug - selectBox

2006-11-06 Thread christian . bach
Hi,

The other day i started working with a new client, our designer wanted 
to use sucker fish type of menus. In the design select boxes are a 
common element due to the fact that this is a e-commerce website. Only 
one thought came to mind, Iframes

So i started thinking, there must be a better way.

And from those thought comes my latest jquery plugin - selectbox.

This is what it does: It hooks right on your existing select element. 
Hides it and appends some div elements and a list, allowing you to 
style it to your taste.
If you select something in the 'fake' selectbox the exact value is 
selected in the hidden selectbox,
so your forms will not no what happend.

Any way here is a small demo:
http://cbach.jquery.com/demos/selectbox/

There are still a few bugs to sort out...

Enjoy
/Christian





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


Re: [jQuery] New way of animating

2006-11-06 Thread Christopher Jordan




I have to
agree that more examples of coding practices would be extremely
helpful. I've got some jQuery stuff workin' on my app., but I'm almost
positive, that I'm missing out on some of the real power that the
library offers. It's probably because I come from a procedural
programing background, and objects still (sometimes) get the better of
me.

I'd offer to help, but I think I'd just be in the way. :o) I'm rather
hoping that something like this comes together, and I can benefit from
it -- okay so I'm selfish... :op

Chris

Rey Bango wrote:

  Hi Paul,

This is the type of stuff that I think would be OOO helpful in a 
tutorial or demo page. Like a best practices type of thing. I recently 
spent a lot of time talking to John about how to get the project more 
exposure and one of the things we threw out was getting more examples of 
coding practices on the site.

Would you mind terribly jotting down some of these examples? I think 
they'd really help new users transition to jQuery.

Let me know.

Rey...

Paul Bakaus wrote:
  
  
Sure Rey ;-)

Maybe my email was a bit too enthusiastic. Don't get me wrong, I'm not 
talking about the script itself, of course it has some problems and 
drawbacks and whatelse. And I really like the way of jQuery animating 
styles.

It's all about the method.

Having a div-element with a certain style, then the jQuery way could be 
like this:

1.) $("#mydiv").animateStyle("background-color: #eee; border: 1px solid 
black; opacity: 0.5;");
-If only one param given, this function animates from the current style 
of the element, to the one given into the function.

2) $("#mydiv").animateStyle(old, new);
-animate from one style to the second

but now my own killer feature :D

3.) $("#mydiv").animateClass(oldClass, newClass); -or- 
$("#mydiv").animateClass(newClass);
-So you change the class of the object, but you animate the change.

Waiting for comments!

2006/11/6, Rey Bango [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]:

If all the animation features are in jQuery standalone, then I'm onboard
with Dan.

What would be good, though, is if a page showing this being done in
jQuery was created. Paul, are you up for that challenge? :o)

Rey...

  Paul Bakaus wrote:
 
 Hey guys,
 
 has someone seen this at ajaxian? Check it out:
 http://berniecode.com/writing/animator.html
http://berniecode.com/writing/animator.html
 This is probably the most sexiest animate lib I've ever seen in
my life.
 Porting this to jQuery would be the PERFECT addition to jQuery's css
 parsing
 possiblities.
 
 What do you think?
 
 --
 Paul Bakaus
 Web Developer
 
 Hildastr. 35
 79102 Freiburg
 
 ___
 jQuery mailing list
 discuss@jquery.com mailto:discuss@jquery.com
 http://jquery.com/discuss/
 
 
 
 

___
jQuery mailing list
discuss@jquery.com mailto: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/

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


  



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


Re: [jQuery] New way of animating

2006-11-06 Thread Dragan Krstic
I was thinking about YUI guy, the official bloger. He show something very 
similar to resize plug-in. It is very effective.
Then, we have solar system, Visual jQuery... I think that jQuery.com must be 
more visual appealing (yeah, I know, John don't have time). More 
informative, like www.pmachine.com. Then, we'll put some effects, 
animations... not extravaganza, just to jiggle it up. The dipper people goes 
in the site, more effects will be added, and so on...
- Original Message - 
From: Rey Bango [EMAIL PROTECTED]
To: jQuery Discussion. discuss@jquery.com
Sent: Monday, November 06, 2006 10:21 PM
Subject: Re: [jQuery] New way of animating


 Feel free to offer something up Dragan. John's a fairly receptive to
 anything that will benefit the project.

 Rey...


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


Re: [jQuery] [Fwd: jquery bug 164] (fix?)

2006-11-06 Thread Brandon Aaron
Weird ... I wrote this email but never sent it :/

I've run it through the test suite and it doesn't affect anything else
but I think Jorn had some tests specific to this bug that need to be
added back in ... so it is probably best to wait for him to commit
this fix to SVN.

--
Brandon Aaron

On 11/4/06, Dave Methvin [EMAIL PROTECTED] wrote:
 Okay, this version doesn't error out at least:

 http://methvin.com/junk/jquery-xml-bug.html?patched

 The fix is to change this line of attr() :

 Old:
   } else if ( elem.getAttribute != undefined  elem.tagName ) { // IE
 elem.getAttribute passes even for style

 New:

   } else if ( typeof(elem.getAttribute) != undefined  elem.tagName ) {
 \

 I think IE  is trying to _call_ elem.getAttribute for some reason, must be a
 bug in the COM typelib for the XML control.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Brandon Aaron
 Sent: Saturday, November 04, 2006 1:01 PM
 To: jQuery Discussion.
 Subject: Re: [jQuery] [Fwd: jquery bug 164]

 On 11/4/06, Brandon Aaron [EMAIL PROTECTED] wrote:
  This is interesting. These both fail for me ...
  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322;
  .NET CLR 2.0.50727)

 I should also mention it fails with the line #722 'Wrong number of arguments
 or invalid property assignment' in both IE6 and IE7.

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


  1   2   >