[jQuery] best practice using jquery.ajax

2007-01-17 Thread byan

dear all,
i'm using $(elm).load(url, function() {...}) to insert new content, but i
found this cost me extra 3-5 times than 
using standar ajax methods, and then insert responseText to elm using
innerHTML.

inserting simple content, using standard ajax cost me 0.2s but using jquery
cost me 1.1s ... inserting complex content with form/input usually cost me
only 1.2s ... but now cost me 6.6s ...

is there something i should know to avoid this ?

i'm using jquery 1.0.4 ...
using jquery 1.1a only reduce minor time.

thx before, and sorry for my bad english ...

-- 
View this message in context: 
http://www.nabble.com/best-practice-using-jquery.ajax-tf3032402.html#a8425339
Sent from the JQuery mailing list archive at Nabble.com.


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


Re: [jQuery] Safari/IE not working at all

2007-01-17 Thread Ⓙⓐⓚⓔ
all the words look good, but that trailing comma I noticed a while
back that firefox permits it...  safari doesn't like it.

On 1/17/07, Kenneth Love [EMAIL PROTECTED] wrote:
 Hey all.

 I have a bit of JQuery magic that works great in Firefox, but not in Safari
 or IE at all. Here's the code:

 $(document).ready(
 function()
 {
 $('div.yui-u').Sortable({
 accept: 'sortable',
 helperclass: 'sortHelper',
 activeclass : 'sortableactive',
 hoverclass : 'sortablehover',
 handle: ' h3.list',
 tolerance: 'pointer',
 });

 $('h3.list').title('Click to expand; drag to reorganize')
 $('dl').hide();
 $('dd').hide();
 $('h3.list').click(function() {
 $(this.parentNode).find('dl').toggle('fast');
 $(this).toggleClass('listDown');
 return false;
 });
 $('li dl dt').click(function() {
 $(this.parentNode).find('dd').toggle('fast');
 });
 }
 );


 You can see it in action at
 http://www.eyeheartzombies.com/webpen-html/ Any ideas?

 Thanks a lot.

 --
 = the blog from beyond =
 = www.eyeheartzombies.com =
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/





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


Re: [jQuery] best practice using jquery.ajax

2007-01-17 Thread Blair McKenzie

What kinds of select strings are you using ( $(in here) ). This can have a
big impact on speed.

Blair

On 1/18/07, byan [EMAIL PROTECTED] wrote:



dear all,
i'm using $(elm).load(url, function() {...}) to insert new content, but i
found this cost me extra 3-5 times than
using standar ajax methods, and then insert responseText to elm using
innerHTML.

inserting simple content, using standard ajax cost me 0.2s but using
jquery
cost me 1.1s ... inserting complex content with form/input usually cost me
only 1.2s ... but now cost me 6.6s ...

is there something i should know to avoid this ?

i'm using jquery 1.0.4 ...
using jquery 1.1a only reduce minor time.

thx before, and sorry for my bad english ...

--
View this message in context:
http://www.nabble.com/best-practice-using-jquery.ajax-tf3032402.html#a8425339
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] fadeOut text

2007-01-17 Thread Blair McKenzie

The jQuery ajax methods take callbacks which are run when the data is
recieved/loaded, so:
$(...).load(url,params,function(){
  $('.notify',this).fadeOut('slow'); // '.notify',this, looks for .notify
elements inside the element being updated
});

Blair

On 1/17/07, Vaska [EMAIL PROTECTED] wrote:


Well, I was close...but still not close enough:

$(document).ready ( function() { $('.notify').fadeOut('slow') });

Works onload - for the obvious reasons.

But, I need this to work any time there is a something with class
'notify'. This is the hard part (I'm reading up on things now). I
also need to pause this, but I think I can throw a setTimeout in
there and all will be ok.

And yeah, it's working fine on a span.

;)



On 16 Jan 2007, at 18:13, James Thomas wrote:


 Use div instead of span - that worked for me when I had a similar
 problem.


 Vaska wrote:


 I'm trying to write my first jquery function using it's rules...it's
 hard getting started.

 I want to write a function that is ready at all times for any div's
 (or perhaps spans's instead) that when they appear they will fade
 away about ten second later. I'll attach a class to the span called
 'notify'...like this...

 span class='notify'Updated/span

 These are appearing via an ajax call already, so they don't appear
 when the page originally loads...only after an ajax call has been
 executed.

 The best I've been able to get so far...no, this doesn't work...I'm
 hoping somebody can help me move forward with this (my head is
 spinning here):

 $(document).ready
 (
  function ()
  {
  $('span.notify').fadeOut('slow')
  }
 );

 I don't care if it simply fades out the text or the entire span...or
 perhaps even innerHTML's the text to an nbsp; (there's another
 idea)...

 Help! ;)

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




 --
 View this message in context: http://www.nabble.com/fadeOut-text-
 tf3021748.html#a8394482
 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] Safari/IE not working at all

2007-01-17 Thread Kenneth Love

Jake:

Thanks a lot, that worked great for Safari. Everything is now hidden in IE,
though, and clicking doesn't show it. Any ideas there?

On 1/17/07, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote:


all the words look good, but that trailing comma I noticed a while
back that firefox permits it...  safari doesn't like it.

On 1/17/07, Kenneth Love [EMAIL PROTECTED] wrote:
 Hey all.

 I have a bit of JQuery magic that works great in Firefox, but not in
Safari
 or IE at all. Here's the code:

 $(document).ready(
 function()
 {
 $('div.yui-u').Sortable({
 accept: 'sortable',
 helperclass: 'sortHelper',
 activeclass : 'sortableactive',
 hoverclass : 'sortablehover',
 handle: ' h3.list',
 tolerance: 'pointer',
 });

 $('h3.list').title('Click to expand; drag to reorganize')
 $('dl').hide();
 $('dd').hide();
 $('h3.list').click(function() {
 $(this.parentNode).find('dl').toggle('fast');
 $(this).toggleClass('listDown');
 return false;
 });
 $('li dl dt').click(function() {
 $(this.parentNode).find('dd').toggle('fast');
 });
 }
 );


 You can see it in action at
 http://www.eyeheartzombies.com/webpen-html/ Any ideas?

 Thanks a lot.

 --
 = the blog from beyond =
 = www.eyeheartzombies.com =
 ___
 jQuery mailing list
 discuss@jquery.com
 http://jquery.com/discuss/





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





--
= the blog from beyond =
= www.eyeheartzombies.com =
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/


Re: [jQuery] best practice using jquery.ajax

2007-01-17 Thread Blair McKenzie

Actually, using an id is as good as it gets. Sorry, that's the only thing I
could think of that would effect the speed so much.

Blair

On 1/18/07, byan [EMAIL PROTECTED] wrote:



i have page like this
body
div id=cleft/div
div id=cmain/div
div id=cright/div
/body

new content always fetch into #cmain ... using $(#cmain).load(url, ...)

what is the best way to speed up the rendering this new content ?

tia,
byan


What kinds of select strings are you using ( $(in here) ). This can have
a
big impact on speed.

Blair


--
View this message in context:
http://www.nabble.com/best-practice-using-jquery.ajax-tf3032402.html#a8425461
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] [PLUGIN] Interface.Draggable zIndex ignored

2007-01-17 Thread Stefan Petre
j. siefer wrote:
 --
 .Draggable({
   zIndex:1000,
   ghosting:true,
   opacity:0.5,
   containment:[_dtP.left,_dtP.top,_dtP.w,_dtP.h],
   insideParent:true
 })
 ---
 Hi, 
 i have problems with zIndex while draggin an element. Is there anyting i
 have to watch out for?

 greetings
 jac
   
It's not ignored. This issue will be fixed with jQuery 1.1.1 or you can 
download hacked version of jQuery from Interface website.

Stefan

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


<    1   2