[jQuery] IE: load()-related memory leak?

2007-11-22 Thread Sagari

Greetings,

I am using jQuery in AJAX-based Web-application that uses load() to
update contents of (a part of) a Web page, through sequences like

$(#pagepart).empty();
$(#pagepart).load(url, {}, afterload);

The problem is that in IE a strange problem was detected: every time
the above sequence is called, memory used by IE grows. No such effects
either in Opera  or in Firefox.

Is this a known problem with IE?

IE version: 6.0.3790.3959, jQuery - the latest (1.2.1).

Thank you.

With all respect,

Konstantin


[jQuery] Re: Suggest a plugin for slider-like construction

2007-11-20 Thread Sagari

Indeed, that looks exactly like what I need. Thank you!

All the best,

Konstantin

On 19 нояб, 19:26, Richard D. Worth [EMAIL PROTECTED] wrote:
 It sounds like you're looking for a layout control called a splitter. Here's
 one:

 http://methvin.com/jquery/splitter/

 - Richard

 On Nov 19, 2007 3:49 AM, Sagari [EMAIL PROTECTED] wrote:



  Greetings,

  Could you please suggest a plug-in to create the following slider-like
  construction:

  - two vertical areas of content
  - a vertical control (narrow rectangular area) separating the two
  content areas
  - when dragging control left or right, the result is the two content
  area are resized smoothly

  Thank you.

  With all respect,

  Konstantin


[jQuery] Suggest a plugin for slider-like construction

2007-11-19 Thread Sagari

Greetings,

Could you please suggest a plug-in to create the following slider-like
construction:

- two vertical areas of content
- a vertical control (narrow rectangular area) separating the two
content areas
- when dragging control left or right, the result is the two content
area are resized smoothly

Thank you.

With all respect,

Konstantin


[jQuery] Re: Lookup doesn't work within HTML loaded with .load()

2007-10-25 Thread Sagari

Thank you Danny, it escaped my mind that the load() can return prior
to DOM structure is updated.

It works OK now that I use the synchronous version.

On 26 окт, 05:58, Danny Wachsstock [EMAIL PROTECTED] wrote:
 .load is asynchronous, which means that it returns (and the next statement is
 executed) before it finishes loading.
 So
$(#left).load(test.html);
 starts loading #left with test.html
 but
$(#left).css(border,1px solid red);
 executes within milliseconds, and test.html probably hasn't come back from
 the server yet. You need to use a callback 
 (http://docs.jquery.com/Ajax/load#urldatacallback):
   $(#left).load(test.html, function(){
  $(#left).css(border,1px solid red);
  etc.
   });

 That ought to work!

 Danny



[jQuery] Re: How to add content here?

2007-08-30 Thread Sagari

Thanks, Karl! Methinks, this is the best method.

On 29 авг, 21:23, Karl Swedberg [EMAIL PROTECTED] wrote:
 On Aug 28, 2007, at 11:12 PM, Sagari wrote:





  Greetings,

  The task: to add content (HTML) exactly at the place where script
  was placed, i.e. how do I get the parent of a

  scrirpt type=text/javascript src=scriptsource.js/script

  -like tag?

  I need to use DOM scripting, not document.write().

  Thank you!

  Konstantin

 Hi Konstantin,

 To add HTML content immediately following  that script tag, you
 wouldn't need to know the parent element. Instead, you could try
 something like this:

 $('[EMAIL PROTECTED]').after('divYour HTML/div');

 That particular example (using a div) would only work if the script
 tag is in the body, though.

 To find the parent of that script, you could do this:

 $('[EMAIL PROTECTED]').parent();

 --Karl
 _
 Karl Swedbergwww.englishrules.comwww.learningjquery.com



[jQuery] How to detect jQuery presence and include it on-the-fly?

2007-08-30 Thread Sagari

Greetings,

The task: include jQuery source on the fly in case it's not loaded.

The script is included on a third-party page and it's not possible to
guarantee the jQuery is already loaded.

What is the simplest way to do that?

Thanks!

All the best,

Konstantin



[jQuery] How to detect jQuery presence and include it on-the-fly?

2007-08-30 Thread Sagari

Greetings,

The task: include jQuery source on the fly in case it's not loaded.

The script is included on a third-party page and it's not possible to
guarantee the jQuery is already loaded.

What is the simplest way to do that?

Thanks!

All the best,

Konstantin



[jQuery] Re: How to add content here?

2007-08-30 Thread Sagari

Hi Mike,

The task is to use DOM scripting instead of good old document.write().
The winds of future, damn them.

Thanks for your code sample!

On 29 авг, 23:55, Michael Geary [EMAIL PROTECTED] wrote:
 My favorite way to do this is to take advantage of the fact that the the
 script tag is the last one in the document at the time that it's executed.
 This works with inline scripts as well as .js files.

 Try pasting this code into the body of a test document:

 Insert text here: {
 script type=text/javascript
 (function() {

 var script = $('script:last');

 $(function() {
 $(script).after( 'Hello World' );
 });

 })();
 /script
 }

 But I'm curious: Why can't you use document.write?

 -Mike

  From: Sagari

  The task: to add content (HTML) exactly at the place where
  script was placed, i.e. how do I get the parent of a

  scrirpt type=text/javascript src=scriptsource.js/script

  -like tag?

  I need to use DOM scripting, not document.write().



[jQuery] Possible jQuery versions conflict

2007-07-31 Thread Sagari

Greetings,

The task: to insert a DOM-style JS code using jQuery into a thrid-
party page. Example: code snippets used to generate AdSense blocks.

This will require a user to include a jQuery source (directly or
indirectly - either the user includes it, or my code snippet does).

The problem: if the page already uses jQuery, the problem looks
inevitable when two jQuery libraries, most probably of different
versions, are loaded.

What is the simplest way to load jQuery in such a case without causing
JS errors?

Thank you.