Re: [jQuery] Ajaxstop() having problems in IE?

2006-11-23 Thread Guntur N. Sarwohadi

Oh, btw.. and i notice that both files (htm and php) needs to be accessed
through a webserver to make that particular error show. I tried accessing
the htm as a file in a browser and although it doesn't spit out the error,
it just wont work (a 'silent' error :p)

cheers,
Guntur N. Sarwohadi

On 11/23/06, Guntur N. Sarwohadi [EMAIL PROTECTED] wrote:


Im also experiencing the same problem.. here is a dummy page for a demo of
the bug. I think you'll need MS Script Debugger to have the  'null' is null
or not an object error show, though..

cheers
Guntur N. Sarwohadi

On 11/23/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:

 tomás pollak schrieb:
  Hello,
 
  I've normally had no problems hiding the spinner/loading on IE for
  ajax calls. However, this time I just can't get it to work, it throws
  me a  'null' is null or not an object error when all AJAX calls have

  finished. Ajaxstart(), hovever, has no issues. I've tried everything,
  even checking if it is a IE CSS/render problem (position: fixed and
  sorts).
 
  Does anyone have a clue as to what can be the problem? I'm using
  JQuery 1.0.3 compressed, and the fader has no issues on Firefox.
 
 Could you put together a simple page that demonstrates the problem? That
 would be a great help to fix this bug, for real this time.

 --
 Jörn Zaefferer

 http://bassistance.de


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




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


Re: [jQuery] getScript error

2006-11-23 Thread Andrea Ercolino


Karl Rudd wrote:
 
  // window.setTimeout(s,0); // blah() fails in all
 Karl Rudd
 

This is very surprising. I tested the setTimeout before posting Jeff's
installScript to this thread, and I found that it worked. But my test was
inappropriate, because I wanted it to succeed with my getScript issue, while
you wanted it to fail in general and your attitude is much better than mine,
for testing something.

So this is just to confirm that your claiming about setTimeout is correct.
Here are the results of my new testing session, using a case very similar to
yours:

The setTimeout works never in Opera, and some times does, other does not in
Firefox. 

Here are the details:

fresh cache
% is subjective

IE + head call: 1st alert: good - 2nd alert: good
IE + body call: 1st alert: good - 2nd alert: good

FF + head call + eval.call: 1st alert: good - 2nd alert: good
FF + body call + eval.call: 1st alert: good - 2nd alert: good

Op + head call + eval.call: 1st alert: good - 2nd alert: good
Op + body call + eval.call: 1st alert: good - 2nd alert: good

FF + head call + setTimeout + go:   1st alert: bad  - 2nd alert: 90% bad
FF + head call + setTimeout + refresh:  1st alert: bad  - 2nd alert: 60% bad

FF + body call + setTimeout + go:   1st alert: bad  - 2nd alert: 60% bad
FF + body call + setTimeout + refresh:  1st alert: bad  - 2nd alert: 60% bad

Op + head call + setTimeout:1st alert: bad  - 2nd alert: bad
Op + body call + setTimeout:1st alert: bad  - 2nd alert: bad




And here is the script used for testing:

function jQuery_eval( script ) {
if (!script)
return;
if (window.execScript)
window.execScript( script );
else {
eval.call( window, script );
//  window.setTimeout( script, 0 );
}
}

var global = not changed;

function hereScript( fn ) {
var re = new RegExp( function\\s*\\(\\s*\\)\\s*\\{((?:.|\\n)*)\\}, 
g );
return re.exec( fn )[1];
}

var script = hereScript( function() {
//-
function blah2() {
alert( hello from blah2() );
}
global = changed;
//-
} );

//alert( script );
function test() {
jQuery_eval( script );
alert( global );
try {
blah2();
}
catch( e ) {
alert( e );
}
}

//test();

-- 
View this message in context: 
http://www.nabble.com/getScript-error-tf2652417.html#a7508366
Sent from the JQuery mailing list archive at Nabble.com.


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


[jQuery] datePicker plugin - show on input click

2006-11-23 Thread Sam Collett
At the moment, the date picker plugin
(http://kelvinluck.com/assets/jquery/datePicker/) uses an anchor added
after the input to show the calendar. What I wanted to do is show it
when I clicked on the input instead.

Also I think it is good practice to add events after adding an element
to the DOM (adding before can cause memory leaks in IE IIRC), so I
have made another tweak to do that.

The fix is as follows (applied to the uncompressed version):

jQuery.fn.datePicker = function(a)
{
this.each(function() {
if(this.nodeName.toLowerCase() != 'input') return;
jQuery.datePicker.setDateWindow(this, a);
if (!jQuery.datePicker.isInited(this)) {
var chooseDate = jQuery.datePicker.getChooseDateStr();
var calBut;
if(a  a.inputClick){
calBut = 
jQuery(this).attr({'class':'date-picker', 'title':chooseDate})
}
else {
calBut = 
jQuery(a).attr({'href':'javascript:;',
'class':'date-picker', 'title':chooseDate})
.append(span + chooseDate + /span);
}
jQuery(this).wrap(
'div class=date-picker-holder/div'
).before(
jQuery(div).attr({'class':'popup-calendar'})
).after(
calBut
);
calBut.click(jQuery.datePicker.show);
jQuery.datePicker.setInited(this);
}
});

};

To use:
$('input#date1').datePicker({inputClick: true});

i.e. add 'inputClick: true' as an option to show the picker when you
click on the input box containing the date.

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


[jQuery] TimePicker plugin

2006-11-23 Thread Sam Collett
Working on a time picker (that works in a similar way to the one used
in Google Calendar).
A bit buggy (mostly CSS issues), but still functional.

http://www.texotela.co.uk/code/jquery/timepicker/

I want to solve the issues in the todo list, so if anyone has any
fixes, it would be appreciated.

I can not test in Safari or Konqueror and it doesn't seem to work
properly in Opera (8.51) - the vertical scroll bar isn't added and the
times just overflow.

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


[jQuery] jQuery.parse[1]

2006-11-23 Thread Andrea Ercolino

There is a little bug in jQuery.parse[1]: the white space shortcut is not
escaped by an additional backslash. 

-- 
View this message in context: 
http://www.nabble.com/jQuery.parse-1--tf2694789.html#a7515200
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] getScript error

2006-11-23 Thread Andrea Ercolino


Jörn Zaefferer wrote:
 
 Looks good for me. 
 

I have browsed dojo and prototype today, but they seem to do nothing special
for eval, ie: I think that they share the same problem, but are unaware of
it.

-- 
View this message in context: 
http://www.nabble.com/getScript-error-tf2652417.html#a7515295
Sent from the JQuery mailing list archive at Nabble.com.


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


[jQuery] Correct way to get the nth item?

2006-11-23 Thread George Adamson

If your jquery results array is in a variable (to reuse it instead of
re-querying over and over again) then what is the best way to get the nth
item from it *without modifying the array* ?

For instance the following would cause the myElements variable to end up
containing only one item!
  var myElements = $(DIV);
  var nthElement = myElements.eq(n);

If it wasn't for the variable the options might be:
 - $(DIV).eq(n)
 - $(DIV:eq(n))
 - $(DIV)[n]   (this one is ok if you want the html element, but I need it
wrapped as a jquery object)

These seem to be the possible solutions: (but which is most efficeient? The
third one looks simplest)
 - myElements.eq(n).each(function(){ ...do something with the nth item
here...}).end()
 - $(:eq(n), myElements)
 - $(myElements[n])

Many thanks. George
-- 
View this message in context: 
http://www.nabble.com/Correct-way-to-get-the-nth-item--tf2694862.html#a7515463
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Sortable Trees Progress?

2006-11-23 Thread Paul Bakaus

Hi Norbert!

It's true, Stefan and me are quite busy right now, and therefore have little
time for our private projects. For myself, I'm currently at home, a week
were I promised I wouldn't do any programming ;-) (which is actually not
quite true..improved a plugin for jQuery, but pssst).
However, I myself look forward in developing the sortable tree and other
advances interface functions on and on to some stable release, and since I
have some paid time given to me from my company to work on jQuery, there
will some updates coming soon.

I'll keep the communtiy updated!

-Paul

2006/11/23, Norbert [EMAIL PROTECTED]:



Dear Stefan and Paul,

This post is by no means intended to put pressure on you guys as I
understand that you are probably quite busy. Having said that, I am quite
eager to know if you have any news regarding the sortable tree
functionality
you mentioned in these posts:

http://www.nabble.com/Sortables%2C-new-approach-tf2497066.html#a7008566

http://www.nabble.com/Serializing-Sortables-%28new-approach%29-tf2533400.html#a7058285

I need the above mentioned functionlity for a small file manager I did
with
the help of Prototype and Scriptaculous and that I am now redoing using
jQuery. On the Prototype version I had to tweak Scriptaculous's drag and
drop functionality in order to make it work with nested droppables, but
the
code got quite complex and the result was not as responsive as I would
have
liked. The demo you did showed great promise, so I was hoping I could use
it
in my new version.

If you have made any progress regarding this functionality, I would love
to
hear about it (especially if you have an estimated time of arrival). If
you
have not, do not worry. As I said, I understand this work is voluntary and
that you are free to progress at your will. Having said that, thanks for
all
the nice Interface work yo have done so far (I will definitely be using it
in my project).

Regards,

Norbert.
--
View this message in context:
http://www.nabble.com/Sortable-Trees-Progress--tf2692685.html#a7508728
Sent from the JQuery mailing list archive at Nabble.com.


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





--
Paul Bakaus
Web Developer

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


Re: [jQuery] jQuery.parse[1]

2006-11-23 Thread Andrea Ercolino


Jörn Zaefferer wrote:
 
 Could you please post that as a bug report? Thanks.
 

Where is the button?

This message links to an empty page:
Note: See TracReports for help on using and creating reports 
-- 
View this message in context: 
http://www.nabble.com/jQuery.parse-1--tf2694789.html#a7515456
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Tabs: reworked fxAutoHeight, what's next on the list

2006-11-23 Thread Klaus Hartl
 LOL well it wasnt what I expected. Is there a way to toggle this
 behavior
 in your plugin?
 Currently not. That's what makes the tabs bookmarkable (and enables
 history support at all) - the hash in the URL changes accordingly. If
 you bookmark that page and come back to the page via that bookmark, the
 correct tab is activated.

 If required I could pretty easy add an option

 bookmarkable: false

 that turns that behavior off. Just let me know!

 Klaus that would be nice. A nice-to-have, not an absolutely-must-have
 feature. :)

That is now implemented. There is an option bookmarkable, default value 
is false unless the history plugin is included as well. In that case it 
becomes true. That seemed to make the most sense to me. If you include 
the history plugin you would want to have the URL change to enable history.

It is in SVN or on http://stilbuero.de/jquery/tabs/


Cheers, Klaus

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


Re: [jQuery] jQuery.parse[1]

2006-11-23 Thread Andrea Ercolino

I've found the button... I'm going to add the report right now :-)
-- 
View this message in context: 
http://www.nabble.com/jQuery.parse-1--tf2694789.html#a7515601
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] DatePicker plugin: dateFormat enhancement [u]

2006-11-23 Thread Kelvin Luck
Hi Stefan,

devsteff [c] wrote:
 hi community and kevin luck,

It's keLvin but that's OK :)

 
 first i must thank kevin you for his great datepicker. it's really fantastic
 and fits perfect into my project (even the css :)). 

Glad you like it!

 but unfortunately he
 forget the old world in his predefiend dateFormats versions. here in
 swiss, austria, and german is the . the regular dateFormat separator. so
 i've changed your plugin a bit and made the formatting/parsing of a date a
 bit more generic. 

Sorry - didn't mean to leave anyone out! Thanks for your patch, I've 
reviewed it and added it into the plugin. This does mean that anyone who 
upgrades the plugin and who is setting a date format will need to edit 
their code but it adds a great deal of flexibility.

 if you find this patch usefull, pls. commit it into the SVN. 

Done :)

 
 btw, i have some feature requests:
 
 1) i need the ability to select a date in the far future (life insurance
 finalization date ~ +20 years, that should not be on weekend, so i need to
 lookup into the calendar). i.e. year paging as well as month paging or
 direkt year selectiong (select box)

This must be the most requested feature for the plugin. It's something I 
originally thought unnecessary but since there has been so many requests 
for it I am willing to implement it. When I next get a free couple of 
hours I'll look at adding it in...

 2) the possibility to set the weeks startday for example to sunday
 

I did this earlier this week. Check through the plugin's page ( 
http://kelvinluck.com/assets/jquery/datePicker/ ) and you will find an 
example (basically when you initialise the datePicker you pass in a 
'firstDayOfWeek' - this allows different datePickers on the same page to 
start on different days of the week (if you so desire).

 did you (kevin) plan something like that? if not, i will take this version
 and start a branch...
 
 regards stefan
 

Thanks for the feedback and the patch!

Kelvin :)

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


Re: [jQuery] Animate: removing inline style breaks for chained animations (Tabs)

2006-11-23 Thread Klaus Hartl
Klaus Hartl schrieb:
 My assumption was wrong (sorry Brandon for the false alarm). That 
 happens if I attach a custom 'activate' event (for the history support). 
 This was done to have access to the plugin settings...: Ugh.
 
 tabs.bind('activate', function() {});
 
 Still no idea how to fix this.

I'm talking to myself a little bit in this thread :-)

The reason is dead simple. Never call a custom event activate, because 
IE has a built-in onactivate event.

Sorry for the noise.


-- 
Klaus

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


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

2006-11-23 Thread Klaus Hartl
Glen Lipka schrieb:
 http://glenlipka.kokopop.com/jQuery/tabs/#
 
 
   I'm thinking about extending the callback system in the Tabs
 plugin to
   not only allow one callback, but different ones for more
 flexibility:
  
  
 
 
 
 On My latest prototype using tabs: 
 http://glenlipka.kokopop.com/jQuery/tabs/# I want to actually run a 
 function when the user hits one particular tab.  I was going to use the 
 callback you have now, and stick an IF statement inside of it to check 
 if it's the right tab.
 
 Would your suggestions here make that easier in the future?

I have now implemented the callbacks: there's an onClick, onHide, onShow 
callback to choose from. Please consider the documentation for more details.

Not sure if that makes your problem easier to solve. At least you are 
more flexible when to perform the check you nedd. If you have a 
reference to that particular tab, you could do a check like this:

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


 I also like the idea of pre-loading the tab content via load(), but I 
 worry about combining tabs with the history plugin.  Would anything 
 break?  Responsiveness and speed are paramount, especially if the tabs 
 have alot of stuff in them.

You know that I'm all for unobtrusiveness and accessibility, so I see no 
point in loading tabs content from a server. Don't do Ajax for the sake 
of Ajax.

But: If you combine the tabs plugin with the remote plugin I think you 
could make it degrade gracefully again (although I haven't tested it):

First build your menu with the links pointing to an URL where the 
content gets loaded from and add dummy tab content (ok that's not 
totally unobtrusive but let's be pragmatic for now):

div id=container
 ul
 lia href=load/content/from.phpFirst tab/a/li
 lia href=load/content/from.phpFirst tab/a/li
 lia href=load/content/from.phpFirst tab/a/li
 /ul
 div id=remote-1/div
 div id=remote-2/div
 div id=remote-3/div
/div

And then build your remote links and initialize tabs afterwards:

$('#container').find('a').remote().end().tabs();

remote() changes the anchors href attribute to #remote-1 etc., so that 
the connection between anchor href and the id of the tab content is 
created, which is required for the tabs initialization.


Cheers, Klaus




-- 
Klaus

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


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

2006-11-23 Thread Klaus Hartl
Matt Grimm schrieb:
 I'm a big fan of this idea, Klaus, and even made a first attempt at
 integrating my own pre-callback. It's useful to me because I am
 dynamically loading (via AHAH) the content of each tab and I want the
 content to load before the tab actually makes the switch. As it is, the
 tab switches to an empty div (rather unattractive), then the content
 loads and pushes the div into shape.

Hi Matt,

I have implemented the extended callback system. For more information 
see my answer to Glen's mail.

I also wrote about how I would implement gracefully degrading Ajax tabs 
there.


-- 
Klaus

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


Re: [jQuery] DatePicker plugin: dateFormat enhancement [u]

2006-11-23 Thread devsteff [c]
 It's keLvin but that's OK :)
sorry keLvin, mea culpa!

 This must be the most requested feature for the plugin. It's 
 something I originally thought unnecessary but since there 
 has been so many requests for it I am willing to implement 
 it. When I next get a free couple of hours I'll look at 
 adding it in...
yippy! saves me a bunch of time, analyzing and understanding your code in
depth!

 I did this earlier this week. Check through the plugin's page 
 ( http://kelvinluck.com/assets/jquery/datePicker/ ) and you 
 will find an example (basically when you initialise the 
 datePicker you pass in a 'firstDayOfWeek' - this allows 
 different datePickers on the same page to start on different 
 days of the week (if you so desire).
ok, very nice. exactly what i want.

so all my datepicker-wishes comes true. that's a good point to go to bed. 
tanks a lot  good night,

stefan

ps: your flickr wanaka winter pics are breathtaking!


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


Re: [jQuery] jQuery Grid

2006-11-23 Thread Alan Gutierrez
* Alan Gutierrez [EMAIL PROTECTED] [2006-11-21 20:50]:
 * Alan Gutierrez [EMAIL PROTECTED] [2006-11-21 13:28]:
  I've created a simple jQuery grid...
  
  http://kiloblog.com/2006/11/19/a-grid-in-jquery/
  
  Your thoughts are appreciated.
 
 Here are direct links to the grid, this latest version includes a
 speed up in rendering.
 
 http://blogometer.com/repository/etude/jQuery/grid/grid-three/grid.html
 
 I consider this a lightweight grid control, for when I want to
 display a table of data in a fixed space. The data set that I build
 this grid to display are addresses of FEMA demoltions, street
 addresses, lats and longs, no long memo fields. Thus, I only want
 the fancy scrolling.

The grid now renders concurrently. Different browsers prefer
different combinations of rows per timeout and time between timeout.

100 rows:

http://blogometer.com/repository/etude/jQuery/grid/grid-six/grid.html

500 rows:

http://blogometer.com/repository/etude/jQuery/grid/grid-six/grid-huge.html

The important thing is that the page is responsive. 

Rendering is faster in this incarnation. Absolute positioning is
much faster that relative layout, especially faster than laying out
the grid as blocks that fload left.

-- 
Alan Gutierrez - 504 717 1428 - [EMAIL PROTECTED] - http://blogometer.com/
Think New Orleans - http://thinknola.com/

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


Re: [jQuery] Ajaxstop() having problems in IE?

2006-11-23 Thread Guntur N. Sarwohadi

Hmm.. weird as..? please let me know, i might learn something from you,
especially i'm particularly new to js and jquery :)

thanks!

On 11/24/06, Jörn Zaefferer [EMAIL PROTECTED] wrote:


Guntur N. Sarwohadi schrieb:
 Oh, btw.. and i notice that both files (htm and php) needs to be
 accessed through a webserver to make that particular error show. I
 tried accessing the htm as a file in a browser and although it doesn't
 spit out the error, it just wont work (a 'silent' error :p)
Ok, thanks. Your code is pretty weird, but nonetheless, it shows the
problem pretty clearly. If you find anything else that may help, just
tell me.

--
Jörn Zaefferer

http://bassistance.de


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

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


Re: [jQuery] CPAN Modul for jQuery ?

2006-11-23 Thread Bruce McKenzie
Stargate is referring to Perl modules that wrap  Javascript libraries.

I've used these, looking for a way to avoid writing Javascript. But my 
experience in using these wrappers is that I end up having to write 
Javascript anyway -- that's what drew me to jQuery :-)

On the Perl side, I use the CGI::Application framework -- it works very 
nicely with jQuery.

--

Bruce

Christof Donat wrote:
 Hi,
 
 Why isn't there a CPAN modul for jQuery?
 
 I guess, because jQuery is not written in Perl.
 
 Christof
 
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/
 
 
 

-- 
Bruce McKenzie
http://www.2MinuteExplainer.com

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


Re: [jQuery] Off topic: which programming language forwebdevelopment

2006-11-23 Thread andy
Quoting Aaron Heimlich [EMAIL PROTECTED]:

That's awesome Aaron. That is pretty powerful.

 On 11/22/06, Christopher Jordan [EMAIL PROTECTED] wrote:
 
 
  Er, you are aware that you can reference strings as arrays in PHP, or if
  needed convert a string to a real array in one line, right?
 
  for ($i=0; $i  strlen($string); ++$i) {
   print $string[$i] . \n;
  }
  foreach (explode($string) as $char) {
   print $char . \n;
  }
 
 How do you tell PHP what the list delimiter is?
 
 
 Actually Christopher mixed up the argument order for explode()[1]. It's:
 
 explode(delimiter, $string);
 
 Actually, explode isn't even the right function to use for what he's
 demonstrating. The str_split function[2] is actually what you want.
 
 foreach(str_split($string) as $char) {
 print $char . \n;
 }
 
 
 [1] http://us3.php.net/manual/en/function.explode.php
 [2] http://us3.php.net/manual/en/function.str-split.php
 
 cfset str = a,b,c,d|d,e,f,g*h,i,j,k|l,m,n,o
 
  I can then turn around and get the first element based on the asterisk
  being the delimiter and then treat the result (a,b,c,d|d,e,f,g) as a new
  list who's delimiter is the pipe and then end up with last list whose
  delimiter is the comma.
 
  cfloop index=i from =1 to=#ListLen(str, '*')#
  cfset str2 = ListGetAt(str, i, *)
  cfloop index=n from=1 to=#ListLen(str2, '|')#
cfset str3 = ListGetAt(str2, n, *)
cfloop index=j from=1 to=#ListLen(str3)#
  !--- do some stuff with the innermost elements of the
  list ---
/cfloop
  /cfloop
  /cfloop
 
  Can you do that in php?
 
 
 $str = a,b,c,d|d,e,f,g*h,i,j,k|l,m,n,o;
 
 foreach(explode(*, $str) as $half) {
 foreach(explode(|, $half) as $quarter) {
 foreach(explode(,, $quarter) as $letter) {
 // Do something unbelivably cool
 }
 }
 }
 




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


Re: [jQuery] Sortable Trees Progress?

2006-11-23 Thread Norbert

Paul, 

Thanks for the reply! I am quite happy to hear you are working on a stable
release and that you will have some updates soon. I will be glued to the
screen waiting for the next version (although I promise I will not abuse my
F5 key). Thanks from a big fan of your (and Stefan's) work,

Norbert.
-- 
View this message in context: 
http://www.nabble.com/Sortable-Trees-Progress--tf2692685.html#a7517040
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Correct way to get the nth item?

2006-11-23 Thread Matt Stith
i think element[n] would be the best, but im no expert.

On 11/23/06, George Adamson [EMAIL PROTECTED] wrote:

 If your jquery results array is in a variable (to reuse it instead of
 re-querying over and over again) then what is the best way to get the nth
 item from it *without modifying the array* ?

 For instance the following would cause the myElements variable to end up
 containing only one item!
   var myElements = $(DIV);
   var nthElement = myElements.eq(n);

 If it wasn't for the variable the options might be:
  - $(DIV).eq(n)
  - $(DIV:eq(n))
  - $(DIV)[n]   (this one is ok if you want the html element, but I need it
 wrapped as a jquery object)

 These seem to be the possible solutions: (but which is most efficeient? The
 third one looks simplest)
  - myElements.eq(n).each(function(){ ...do something with the nth item
 here...}).end()
  - $(:eq(n), myElements)
  - $(myElements[n])

 Many thanks. George
 --
 View this message in context:
 http://www.nabble.com/Correct-way-to-get-the-nth-item--tf2694862.html#a7515463
 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] getScript error

2006-11-23 Thread 沈志川 (Benx)

If so, you can not override jQuery.getScript function.

But my test result is, IE6 and FF2 would wait to finish downloading the
script
and continue the program.


jQuery.getScript = function (src, callback) {
var js = document.createElement('SCRIPT');
js.type = 'text/javascript';
js.src = src;
js.defer = true;
document.body.appendChild(js);  // IE6 and FF2 would wait to

finish downloading the script (NOT async)
 if(callback) callback(js.text || js.textContent || js.innerHTML ||
);  // call the callback function

}





On 11/24/06, Andrea Ercolino [EMAIL PROTECTED] wrote:




沈志川 (Benx) wrote:

 Why not use document.createElement(script) !?


Because we want jQuery to wait until the script is loaded and evaluated,
so
it's possible to do something upon completion, like continuing the normal
flow of the program. This is necessary for example for writing a require
like the one in PHP.

--
View this message in context:
http://www.nabble.com/getScript-error-tf2652417.html#a7514393
Sent from the JQuery mailing list archive at Nabble.com.


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





--
Best regards,
沈志川 (Benx)
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] getScript error

2006-11-23 Thread Michael Geary
  Why not use document.createElement(script) !?

 Because we want jQuery to wait until the script is loaded and 
 evaluated, so it's possible to do something upon completion, 
 like continuing the normal flow of the program. This is 
 necessary for example for writing a require like the one in PHP.

You can't do that, and you wouldn't want to if you could. JavaScript doesn't
work that way. If you were successful in getting JavaScript to wait until a
script is loaded, the entire browser would be locked up in the meantime.

What you *could* do is something like this:

   require( script, completion );

e.g.

   require( 'test.js', function() {
  // This code runs when the script is loaded
   });

-Mike


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


Re: [jQuery] Correct way to get the nth item?

2006-11-23 Thread Blair McKenzie

There is an undocumented feature of jQuery where destructive methods (like
eq()) will accept a callback function as a second argument. That function
will have the new selection as 'this', but other methods on the chain will
still be using the origonal selection. i.e. $(div).eq(n,function(){
this.hide(); }).eq(m,function(){ this.show() });

Blair

On 11/24/06, Matt Stith [EMAIL PROTECTED] wrote:


i think element[n] would be the best, but im no expert.

On 11/23/06, George Adamson [EMAIL PROTECTED] wrote:

 If your jquery results array is in a variable (to reuse it instead of
 re-querying over and over again) then what is the best way to get the
nth
 item from it *without modifying the array* ?

 For instance the following would cause the myElements variable to end up
 containing only one item!
   var myElements = $(DIV);
   var nthElement = myElements.eq(n);

 If it wasn't for the variable the options might be:
  - $(DIV).eq(n)
  - $(DIV:eq(n))
  - $(DIV)[n]   (this one is ok if you want the html element, but I
need it
 wrapped as a jquery object)

 These seem to be the possible solutions: (but which is most efficeient?
The
 third one looks simplest)
  - myElements.eq(n).each(function(){ ...do something with the nth item
 here...}).end()
  - $(:eq(n), myElements)
  - $(myElements[n])

 Many thanks. George
 --
 View this message in context:

http://www.nabble.com/Correct-way-to-get-the-nth-item--tf2694862.html#a7515463
 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/


Re: [jQuery] Correct way to get the nth item?

2006-11-23 Thread Aaron Heimlich

On 11/23/06, George Adamson [EMAIL PROTECTED] wrote:


- $(myElements[n])



If you want to wrap the nth element of myElements in a jQuery object, then
that looks like the way to go.

--
Aaron Heimlich
Web Developer
[EMAIL PROTECTED]
http://aheimlich.freepgs.com
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] Happy Thanksgiving

2006-11-23 Thread Paul McLanahan
Here here Yehuda!  You said it perfectly. Thanks everyone, and have a
great weekend!

Paul

On 11/23/06, Yehuda Katz [EMAIL PROTECTED] wrote:
 In the spirit of thanksgiving, I want to say that I'm thankful for John and
 the rest of the gang for creating and tweaking jQuery. It's quite literally
 made my Javascript development a pleasure, and even solving messy problems
 with the internals of jQuery has given me a tremendous amount of joy this
 year.

 So thank you all, and let's keep on keeping on.

 -- Yehuda


 On 11/23/06, John Resig [EMAIL PROTECTED]  wrote:
   Don't kill anybody trying to get a Wii on Black Friday.
 
  I've been trying to get one, but haven't had any luck thus far. I
  think it just means that I need to be doing more work and less playing
  around ;-)
 
  Although, I recently acquired copies of Star Trek: The Next
  Generation, so I'm very content watching those.
 
  --John
 
  ___
  jQuery mailing list
  discuss@jquery.com
  http://jquery.com/discuss/
 



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




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


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

2006-11-23 Thread Matt Grimm
Thanks, Klaus! Nice work. I'll fully check it out tomorrow and try to
integrate it into my current project.

m. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Klaus Hartl
Sent: Thursday, November 23, 2006 2:01 PM
To: jQuery Discussion.
Subject: Re: [jQuery] Tabs plugin callbacks - what makes most sense?

Matt Grimm schrieb:
 I'm a big fan of this idea, Klaus, and even made a first attempt at
 integrating my own pre-callback. It's useful to me because I am
 dynamically loading (via AHAH) the content of each tab and I want the
 content to load before the tab actually makes the switch. As it is,
the
 tab switches to an empty div (rather unattractive), then the content
 loads and pushes the div into shape.

Hi Matt,

I have implemented the extended callback system. For more information 
see my answer to Glen's mail.

I also wrote about how I would implement gracefully degrading Ajax tabs 
there.


-- 
Klaus

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

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


Re: [jQuery] Ajaxstop() having problems in IE?

2006-11-23 Thread Jörn Zaefferer
Guntur N. Sarwohadi schrieb:
 Hmm.. weird as..? please let me know, i might learn something from 
 you, especially i'm particularly new to js and jquery :)
You should add any ajax handlers before calling $.ajax, not inside of 
the success callback. You code worked because the ajaxStop event is 
triggered after the success callback, but you shouldn't rely on that. 
I'll upload my modified version, if that helps.

-- 
Jörn Zaefferer

http://bassistance.de


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


Re: [jQuery] Correct way to get the nth item?

2006-11-23 Thread Jörn Zaefferer
Blair McKenzie schrieb:
 There is an undocumented feature of jQuery where destructive methods 
 (like eq()) will accept a callback function as a second argument. That 
 function will have the new selection as 'this', but other methods on 
 the chain will still be using the origonal selection. i.e. 
 $(div).eq(n,function(){ this.hide(); }).eq(m,function(){ this.show() });
Yo, but please don't use those. I'd stick with one of the select one 
element into new jQuery object until 1.1 is here. 1.1 won't have that 
destructive behaviour anymore (while still providing end()), and most 
likely, the above mentioned will be then redundant and removed.

-- 
Jörn Zaefferer

http://bassistance.de


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