Re: [jQuery] Typo in API

2006-09-24 Thread Jörn Zaefferer
Glen Lipka schrieb:
 In http://jquery.com/api under PREV(), the examples say previous().
Fixed (soon in SVN) :-)

-- Jörn

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


Re: [jQuery] Ajax numpty, stumbling around

2006-09-24 Thread Jörn Zaefferer
Klaus Hartl schrieb:
 If desired I would put it on the jQuery blog. Or add that to the 
 cookbook section. Or both - I'm all open...
   
Actually I added it to the Wiki already: 
http://jquery.com/docs/ProgressiveEnhancement/

-- Jörn

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


Re: [jQuery] Ajax numpty, stumbling around

2006-09-24 Thread Jörn Zaefferer
Klaus Hartl schrieb:
 Ah, btw, I made a little error here. This is correct:
 $('#hijax-me').submit(function() {
  return false;
 });
   
Ye gods! Updated the wiki entry :-)

-- Jörn

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


[jQuery] Strange bug: animate converts 'show' to boolean

2006-09-24 Thread Klaus Hartl
Hi,

today I wanted to add to the tabs plugin the possibility to define your 
own animation for the tab switch.

Like:

$('#container-8').tabs({fxAnimate: [{height: 'show', opacity: 'show'}, 
{height: 'hide', opacity: 'hide'}]});

There is a strange bug although. It works on the first click, but throws 
an error on subsequent clicks.

I found out, that the value of fxAnimate[0].show is converted to a 
boolean and therefore the error occurs.

See here:
http://stilbuero.de/jquery/tabs/ (at the very bottom)


Does anyone know what's going on here?

Strangely enough it works with other animations...



-- Klaus







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


[jQuery] interface - isortables and latest version of jquery

2006-09-24 Thread Sam Sherlock
I am having issues with interface sortable and newer version of jqueryis this a known situation?Is there a solution?

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


Re: [jQuery] interface - isortables and latest version of jquery

2006-09-24 Thread Jörn Zaefferer
Sam Sherlock schrieb:
 I am having issues with interface sortable and newer version of jquery

 is this a known situation?
 Is there a solution?
Using Interface with jQuery 1.0.1 should not be a problem. If there is, 
it would help if you report the exact problem.
If you use Interface with the latest SVN version... you should report 
your problem, too. In the latter case, it is more likely that it is not 
a know problem.

-- Jörn

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


[jQuery] Form plugin - move to core?

2006-09-24 Thread Mike Alsup
The recent increase in questions about form serialization and form
submission makes me wonder the following about why the form plugin is
not used more:

1.  Is it not meeting your needs?
2.  Did you not know it exists?
3.  Do you prefer not to use plugins?
4.  Something else?

I also wonder if its 3 methods should just be added to core.  It's
been pointed out that core's serialize method is somewhat lacking.
The form plugin's serialize method handles every case that I've seen
questioned on this list.  Unfortunately, the two serialize methods
differ in their return types which probably adds more confusion.  But
rather than beef up core's serialize method why not converge the two
now and eliminate this confusion?

My personal preference would be to move the form plugin methods into
core, remove core's existing serialize method and introduce a
serializeToString (or something like that) that has a string return
type in the form of name=valuename=value.  All this would increase
the size of core, but only by 2k before packing.

I'd love to hear opinions on this.

Mike

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


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

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

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

-- Fil


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


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

2006-09-24 Thread Rey Bango


Mike Alsup wrote:
 The recent increase in questions about form serialization and form
 submission makes me wonder the following about why the form plugin is
 not used more:
 2.  Did you not know it exists?

This was the reason that I didn't use it in my most recent project. I've 
since seen the plugin and wish I had know about it sooner.

 My personal preference would be to move the form plugin methods into
 core, remove core's existing serialize method and introduce a
 serializeToString (or something like that) that has a string return
 type in the form of name=valuename=value.  All this would increase
 the size of core, but only by 2k before packing.

I would love to see it included in the core, especially if the size 
impact is minimal. I would *not* want the other serialization methods 
removed as this effectively prevents people from upgrading if they've 
taken advantage of an existing method. EasyDOM already feel prey to this 
and won't work with JQuery v1.0.1.

My 2 cents.

Rey...


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


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

2006-09-24 Thread Jörn Zaefferer
Mike Alsup schrieb:
 My personal preference would be to move the form plugin methods into
 core, remove core's existing serialize method and introduce a
 serializeToString (or something like that) that has a string return
 type in the form of name=valuename=value.  All this would increase
 the size of core, but only by 2k before packing.

 I'd love to hear opinions on this.
   
I think that would be a good idea. For the ones who currently use core + 
form, the file size would be reduced. And it would be much easier to use 
for all those who simply haven't heard, or rather, read, about the form 
plugin.

Rey Bango schrieb:
 I would *not* want the other serialization methods 
 removed as this effectively prevents people from upgrading if they've 
 taken advantage of an existing method. EasyDOM already feel prey to this 
 and won't work with JQuery v1.0.1.
   
Currently both serialize methods have the same signature, but different 
return types. I guess it would be less pain to keep the old serialize 
like it this and rename the form serialize. On the other hand, it would 
be less confusing to have a serialize() and serializeAsString() or 
serializeQuery(). Or maybe serialize() - returns an array, and 
serialize('') - returns the form as a string joined with an ampersand. 
I'd prefer a solution that works in a long term. As long as this is 
introduced with a major release with proper release notes, it shouldn't 
be a big problem to upgrade.

-- Jörn

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


Re: [jQuery] Strange bug: animate converts 'show' to boolean

2006-09-24 Thread Klaus Hartl


Klaus Hartl schrieb:
 Hi,
 
 today I wanted to add to the tabs plugin the possibility to define your 
 own animation for the tab switch.
 
 Like:
 
 $('#container-8').tabs({fxAnimate: [{height: 'show', opacity: 'show'}, 
 {height: 'hide', opacity: 'hide'}]});
 
 There is a strange bug although. It works on the first click, but throws 
 an error on subsequent clicks.
 
 I found out, that the value of fxAnimate[0].show is converted to a 
 boolean and therefore the error occurs.


Forget about that, it seems, that the object is changed by design... I 
simply pass in a copy of the original animate object.

-- Klaus

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


[jQuery] Suckerfish

2006-09-24 Thread TJ

Hi, I am using the suckerfish plugin. How can I make it so I can have a drop 
down menu from a drop down menu.


-Menu
   |
-menu 1
-menu 2
   |
- menu 2.1
- menu 2.2
 -menu 3
 -menu 4

Thanks

-TJ


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


[jQuery] Global AJAX handlers

2006-09-24 Thread Jörn Zaefferer
Hi folks,

which of the following examples of global ajax handlers make more sense 
and are easier to understand?

$(#msg).ajaxSuccess(function(){
  $(this).append(liSuccessful Request!/li);
});

or

$.ajaxSuccess(function(){
  $(#msg).append(liSuccessful Request!/li);
});

With chaining:
$(#msg).ajaxStart(function(){
  $(this).show();
}).ajaxStop(function() {
 $(this).hide();
});

or

var msg = $('#msg');
$.ajaxStart(function() {
  msg.show();
});
$.ajaxStop(function() {
  msg.hide();
});

Your opinion is appreciated.

-- Jörn

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


Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Klaus Hartl


Jörn Zaefferer schrieb:
 Hi folks,
 
 which of the following examples of global ajax handlers make more sense 
 and are easier to understand?
 
 $(#msg).ajaxSuccess(function(){
   $(this).append(liSuccessful Request!/li);
 });
 
 or
 
 $.ajaxSuccess(function(){
   $(#msg).append(liSuccessful Request!/li);
 });
 
 With chaining:
 $(#msg).ajaxStart(function(){
   $(this).show();
 }).ajaxStop(function() {
  $(this).hide();
 });
 
 or
 
 var msg = $('#msg');
 $.ajaxStart(function() {
   msg.show();
 });
 $.ajaxStop(function() {
   msg.hide();
 });
 
 Your opinion is appreciated.
 
 -- Jörn



Hi Jörn,

I like chaining most!

Although I think the following might make more sense anyway:

$.ajax({
...
stop: function() {},
start: function() {},
...
});

That way I have more control over which XHR requests are displayed. 
There may be some that the user is not aware of and does not need to be 
(validation, ping etc.)


-- Klaus

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


Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Brandon Aaron
Well I think global should probably mean global and not attached to
anything but the jQuery object. Perhaps sometimes I don't want or need
to have an ajaxSuccess method be attached to a DOM node. The only way
I think having it like this:
$('#msg').ajaxStart(...
makes sense is if mutliple global handlers can be attached.

Brandon

On 9/24/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:
 Hi folks,

 which of the following examples of global ajax handlers make more sense
 and are easier to understand?

 $(#msg).ajaxSuccess(function(){
   $(this).append(liSuccessful Request!/li);
 });

 or

 $.ajaxSuccess(function(){
   $(#msg).append(liSuccessful Request!/li);
 });

 With chaining:
 $(#msg).ajaxStart(function(){
   $(this).show();
 }).ajaxStop(function() {
  $(this).hide();
 });

 or

 var msg = $('#msg');
 $.ajaxStart(function() {
   msg.show();
 });
 $.ajaxStop(function() {
   msg.hide();
 });

 Your opinion is appreciated.

 -- Jörn

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


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


Re: [jQuery] Help finding parent element

2006-09-24 Thread George Adamson

Good point about using $(../,this) as an alternative to using
$(this).parent(), though I've noticed that the syntax should be $(..,this)
to return the parent, while $(../,this) returns siblings. Does this sound
right?

Cheers,

George Adamson


Glen Lipka wrote:
 
 Parent() works, and also xPath expressions: (damn, jquery has so much
 power
 on traversal)
 refer to: http://jquery.com/docs/Base/Expression/XPath/
 
 Example: $(../,this) should get the parent too.
 
 It actually would really help Getting Started if someone would write a
 bunch (like 100) of common traversal examples.  There are a bunch of
 examples on several different sites, but they lack explanation of what
 they
 are doing. (Like the URL above).  A traversal cheat sheet! :)
 
 On thing that has REALLY helped me is to use MS Script Editor.  You put
 the
 word debugger; in your code and then use the watch word functionality to
 explore the jQuery object.  So you can type in anything like $(../,this)
 and see what that gives you.  Easy to play around and see what hits what
 node.
 
 Hope this helps.
 
 Glen
 
 On 9/23/06, Rey Bango [EMAIL PROTECTED] wrote:

 I'm just getting into the ins and outs of JQuery but I believe you can
 use the .parent() method to do that. Something like this:

 $(p).parent()

 HTH.

 Rey...

 Bruce McKenzie wrote:
  What's the preferred/simplest way to get hold of the immediate parent
 of
  a DOM element?
 
  I've got a table in which some cells are editable (I'm using the
  excellent editable plugin by Dylan Verheul). When a cell is changed,
 the
  database gets updated and the Ajax callback needs to recalculate the
 sum
  of the cells in the row.
 
  So, I have this in the editable object:
 
   callback:function(){
   recalcEstimate ( myCell ) ;
  // myCell is jQuery obj containing one TD tag
   }
 
  and this is what gets called:
 
  function recalcEstimate(myCell){
  var myRow = myCell[0].parentNode;
  // this seems weird, but I couldn't retrieve the DOM element
  // I want from anything like myCell.parent()
  var total=0;
  $( 'td.editable', myRow ).each(function(){
 var aNum = $( this ).text();
 total += Number(aNum) ;
  });
  $(myRow).find('.total').html( total.toFixed(1)  ) ;
  }
 
  This works -- but I don't think I've seen any code written by someone
  who knows what they are doing (e.g., in the plugins or tutorials) that
  looks like this :-)
 
  What's the best practice?
 
  Bruce
  http://www.2MinuteExplainer.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/
 
 

-- 
View this message in context: 
http://www.nabble.com/Help-finding-parent-element-tf2324683.html#a6476467
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Andre Lewis
I think the global responders should be attached to the jQuery object rather than to a DOM element. That said, it's very useful to be able to override the global responders for individual requests -- as Klaus points out, there are often XHR requests that don't merit the user's attention.
AndreOn 9/24/06, Klaus Hartl [EMAIL PROTECTED] wrote:
Jörn Zaefferer schrieb: Hi folks, which of the following examples of global ajax handlers make more sense and are easier to understand? $(#msg).ajaxSuccess(function(){
 $(this).append(liSuccessful Request!/li); }); or $.ajaxSuccess(function(){ $(#msg).append(liSuccessful Request!/li);
 }); With chaining: $(#msg).ajaxStart(function(){ $(this).show(); }).ajaxStop(function() {$(this).hide(); }); or var msg = $('#msg');
 $.ajaxStart(function() { msg.show(); }); $.ajaxStop(function() { msg.hide(); }); Your opinion is appreciated. -- Jörn

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


Re: [jQuery] Global AJAX handlers

2006-09-24 Thread Mike Alsup
 the global responders for individual requests -- as Klaus points out, there
 are often XHR requests that don't merit the user's attention.

You can't really override the global responders.  If you declare
local handlers they are called in addition to the global methods, not
instead of them.

Mike

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


[jQuery] visualjquery.com inaccessible

2006-09-24 Thread Clodelio Delfino
Hi All,

Can i ask a copy of the first issue, attached and sent directly to my
email? I can't access the site as of 9:08 AM GMT +8 (Malay Peninsula
Time)...

Thanks in advance... c,)

Cheers,
cdelfino


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


Re: [jQuery] visualjquery.com inaccessible

2006-09-24 Thread Yehuda Katz
Something is wrong with my server. I am working on getting it started up again.-- YehudaOn 9/24/06, Clodelio Delfino 
[EMAIL PROTECTED] wrote:Hi All,Can i ask a copy of the first issue, attached and sent directly to my
email? I can't access the site as of 9:08 AM GMT +8 (Malay PeninsulaTime)...Thanks in advance... c,)Cheers,cdelfino___jQuery mailing list
discuss@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] Form plugin - move to core?

2006-09-24 Thread Mike Alsup
 I don't see there is something deal with multiple-select situation in
 forms.js. And serialize( ) in form.js, you return a hash value, and
 this will only hold one value if the input element has the same name.
 So I'd like your below idea introduce a serializeToString, and I
 think it's better. But in my thread I also point that param() method
 in jQuery core will only receive jQuery object or hash, but not a
 string at all. And I think param() method should also be changed.

Hi limodou,

The serialize method in forms.js handles multiple-select fields just
fine.  It does not return a hash, it returns an Array.  Each selected
option element is added to the array.  I have a test page that shows
this in action here: http://www.malsup.com/jquery/form/

Cheers.

Mike

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


[jQuery] $().load didn't works ini IE6

2006-09-24 Thread Donny Kurnia
I need help to make the following code works in IE :

document.writeln(select name=\+name+\
id=\+name+\+((multiple!=null)? +multiple:)+);
  var tablename = some_table;
  $(#+name).load(table_query.php, {table: tablename});
document.writeln(\/select);

Script table_query.php return option elements. This code work well
in Firefox, but in IE, the select had no option.
I tried to change table_query.php result to xml, and use following code :

document.writeln(select name=\+name+\
id=\+name+\+((multiple!=null)? +multiple:)+);
  var tablename = some_table;
  var myRandom = parseInt(Math.random()*);
  $.get(table_query.php, {table: tablename, rand: myRandom},
function (r, type) {
//alert (xml);
//remove previous element
$(#+name).empty();
var options = r.getElementsByTagName(option);
var names = r.getElementsByTagName(name);
var name = names[0].getAttribute(value);
for (var i=0; ioptions.length; i++) {
  var value = options[i].getAttribute(value);
  var label = options[i].firstChild.nodeValue;
  var newOptions = new Option(label, value);
  $(#+name).append(newOptions);
}
  });
document.writeln(\/select);

works with Ff, but still don't work with IE. D*** IE :(

--
Donny Kurnia
http://hantulab.multiply.com/
http://hantulab.blogspot.com/
---
At times the world can seem an unfriendly and sinister place. But
believe us when we say there is much more good in it than bad. And
what might seem to be a series of unfortunate events, may in fact, be
the first steps of a journey.
-- A Series of Unfortunate Events

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


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

2006-09-24 Thread limodou
On 9/25/06, Mike Alsup [EMAIL PROTECTED] wrote:
  I don't see there is something deal with multiple-select situation in
  forms.js. And serialize( ) in form.js, you return a hash value, and
  this will only hold one value if the input element has the same name.
  So I'd like your below idea introduce a serializeToString, and I
  think it's better. But in my thread I also point that param() method
  in jQuery core will only receive jQuery object or hash, but not a
  string at all. And I think param() method should also be changed.

 Hi limodou,

 The serialize method in forms.js handles multiple-select fields just
 fine.  It does not return a hash, it returns an Array.  Each selected
 option element is added to the array.  I have a test page that shows
 this in action here: http://www.malsup.com/jquery/form/

 Cheers.

Ok, I tested also, and it's my fault, I'm sorry. And I think the
form.js should be move to core. That's great. And I'll use form.js to
replace my code.

-- 
I like python!
UliPad The Python Editor: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

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


Re: [jQuery] visualjquery.com inaccessible

2006-09-24 Thread Yehuda Katz
The site is up and running! Digg it!-- YehudaOn 9/24/06, Yehuda Katz [EMAIL PROTECTED] wrote:
Something is wrong with my server. I am working on getting it started up again.-- Yehuda
On 9/24/06, Clodelio Delfino 

[EMAIL PROTECTED] wrote:Hi All,Can i ask a copy of the first issue, attached and sent directly to my
email? I can't access the site as of 9:08 AM GMT +8 (Malay PeninsulaTime)...Thanks in advance... c,)Cheers,cdelfino___jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/-- Yehuda KatzWeb Developer | Wycats Designs
(ph)718.877.1325

-- Yehuda KatzWeb Developer | Wycats Designs(ph)718.877.1325
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


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

2006-09-24 Thread Dylan Verheul
On 9/24/06, Mike Alsup [EMAIL PROTECTED] wrote:
 I also wonder if its 3 methods should just be added to core.

I think this would be a good idea. People to know Prototype (and
perhpas other frameworks) expect form functionality. As Mike said,
core is lacking in some features that form does very well.

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