[jQuery] Re: AJAX .load into an iframe - possible?

2007-10-15 Thread Larry Garfield

Don't use .load() to load an iframe.  Just set the iframe object's src 
property and the browser will do it for you.



$('#foo').attr('src', 'myurl');

I did that extensively on http://www.imamuseum.org/.  Actually what I did 
there was have an iframe inside of a div, and the div would get hidden or 
shown by jQuery at the same time that I set the src.  That way I 
could "remove" the iframe whenever I wanted by just hide()ing its wrapping 
div.

On Monday 15 October 2007, Duncan Anker wrote:
> I am attempting to create preview panes on a page which need to have
> their own separate stylesheets, and as such need to be loaded as
> external documents (or at least, I can't think of another way to do it).
>
> I have set up a couple of iframes -- ideally I'd sooner use objects to
> stay strict, however they seem like a nasty and even more opaque data
> structure -- and have tried a few methods to get the data to show up. As
> far as I can tell, the load call works fine, firebug shows the post and
> response, however there is no joy.
>
> I wouldn't have thought it would be a cross-domain problem since they
> should be loading from the same server, however I have also tried
> dynamically creating the iframes just in case.
>
> This works when #preview is a div:
>
> $('#preview').load('myurl', data);
>
> but it stuffs up the CSS. It does not work, and neither it should, if
> #preview is an iframe. However, I thought something like
>
> $('body[0]', $('#preview')).load('myurl', data);
>
> might do the trick. It didn't of course.
>
> Thus far there is no combination of jQuery and regular DOM scripting
> that has yielded positive results, and I'm beginning to wonder if it is
> all some kind of extremely long-running April Fools' prank.
>
> There's got to be some simple way to do this, so what am I overlooking?
>
> TIA


-- 
Larry Garfield  AIM: LOLG42
[EMAIL PROTECTED]   ICQ: 6817012

"If nature has made any one thing less susceptible than all others of 
exclusive property, it is the action of the thinking power called an idea, 
which an individual may exclusively possess as long as he keeps it to 
himself; but the moment it is divulged, it forces itself into the possession 
of every one, and the receiver cannot dispossess himself of it."  -- Thomas 
Jefferson


[jQuery] AJAX .load into an iframe - possible?

2007-10-15 Thread Duncan Anker


I am attempting to create preview panes on a page which need to have 
their own separate stylesheets, and as such need to be loaded as 
external documents (or at least, I can't think of another way to do it).


I have set up a couple of iframes -- ideally I'd sooner use objects to 
stay strict, however they seem like a nasty and even more opaque data 
structure -- and have tried a few methods to get the data to show up. As 
far as I can tell, the load call works fine, firebug shows the post and 
response, however there is no joy.


I wouldn't have thought it would be a cross-domain problem since they 
should be loading from the same server, however I have also tried 
dynamically creating the iframes just in case.


This works when #preview is a div:

$('#preview').load('myurl', data);

but it stuffs up the CSS. It does not work, and neither it should, if 
#preview is an iframe. However, I thought something like


$('body[0]', $('#preview')).load('myurl', data);

might do the trick. It didn't of course.

Thus far there is no combination of jQuery and regular DOM scripting 
that has yielded positive results, and I'm beginning to wonder if it is 
all some kind of extremely long-running April Fools' prank.


There's got to be some simple way to do this, so what am I overlooking?

TIA

--
Duncan Anker
Server 101, Web Hosting & E-Commerce
http://www.server101.com



[jQuery] Drupal Form + jQuery Forms Plugin + File Uploads (Drupallers & jQuery gurus please)

2007-10-15 Thread dgt

It was difficult to decide where I should post this. I think the issue
is with jQuery though, I'm certainly no pro with jQuery, having only a
few months experience.

Let me explain my problem.

I'm using a form which has a file upload,  and also sends standard
text data. This form I wish to be ajax'ed.

I'm using this code:

$("#node-form").ajaxForm(function(){alert("Thank you for your
submission!");});

If I upload an image, I'll still get that message, but the image is
not uploaded to image.module in drupal (which handles image thumbnail
creation etc) . In fact, it's not uploaded at all.

If I strip the file field, and use a different content type (Story
type for those who use Drupal, which just creates a page), it works
beautifully. I therefore deduced there's something amiss with file
uploading. How can I send an image with the Form Plugin, so Drupal can
then generate what it needs.

I have searched the list and the internet, but do not understand what
to do. Please help if you can.



[jQuery] Re: How to bind data to the ajax callback function?

2007-10-15 Thread arphenlin

Wizzud,
Thanks for your help. I can understand the problem is the scope of
variables.
My idea is to transfer the userData to $.get() and then I can get it
back in the callback function without considering the variable scope
problem. Isn't it more intuitive?

On Oct 16, 1:24 am, Wizzud <[EMAIL PROTECTED]> wrote:
> It's not ambiguous at all.
> Your problem is not with the $.get() but with the code around it.
> $.get() does exactly what it is intended to do - it fetches a single
> 'page' (of some sort) and provides you with the mechanism for handling
> that page when successfully retrieved.
> You are trying to handle multiple $.get()s in a single loop, with each
> retrieved 'page' (presumably) being handled differently, and in the
> process of doing so you're getting the scope of some variables mixed
> up. That's all.
>
> If you really want to minimise it, and you really only have a loop of
> 2, then ...
>
> var url='http://foo.bar/?param=';
> $.each([0,1],function(i,j){
> $.get(url+j, function(html){
> alert(j);
>   });
>   });
>
> On Oct 14, 2:10 pm, arphenlin <[EMAIL PROTECTED]> wrote:
>
> > It's so ambagious. I really hope jQuery can provide a *userData*
> > parameter like this:
> > jQuery.get( url, [data], [callback], [userData] )
>
> > Then I can achieve my goal with this way:
> > for(var i=0; i<2; i++){
> > $.get(url+i, function(html, userData){
> > doit(html, userData['tag']); // userData was bound to ajax
> > callback
> > }, {'tag': i});
>
> > }
> > Wizzud wrote:
> > > var url='http://foo.bar/?param=';
> > > for(var i=0; i<2; i++){
> > > submitAjax(i);
> > > }
> > > function submitAjax(i){
> > > $.get(url+i, function(html){
> > > doit(html, i);
> > > });
> > > }
> > > function doit(html, tag){
> > > alert(tag);
> > > }
>
> > > On Oct 13, 11:04 am, arphenlin <[EMAIL PROTECTED]> wrote:
> > > > Below is an example to use jQuery.get() to get some html data.
> > > > I expect that "0", "1" (or "1", "0") are displayed, however, it
> > > > displayed "2", "2".
> > > > How can I do?
>
> > > > var url='http://foo.bar/?param=';
> > > > for(var i=0; i<2; i++){
> > > > $.get(url+i, function(html){
> > > > doit(html, i); // bind 'i' to the callback function
> > > > });
>
> > > > }
>
> > > > function doit(html, tag){
> > > > alert(tag);
>
> > > > }



[jQuery] Re: creating drop down menus with JQuery?

2007-10-15 Thread Sergei NZ

Also try these:

http://test.learningjquery.com/dropdown.htm
http://users.tpg.com.au/j_birch/plugins/superfish/

On Oct 16, 11:13 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is there a plug-in that allows for menu creatio in JQuery?
> Specifically, I'm looking for something where when you roll over an
> arrow graphic, a menu will pop up beneath it.  I do not need submenus
> to pull out over individual menu items.
>
> Thanks for any advice, - Dave



[jQuery] two subscriptions to the same group

2007-10-15 Thread rsmolkin

Hi All,

This is strange, and I am not sure how it happened, but I think
somehow I got 2 different subscriptions to this group, one as rsmolkin
and one as pixelwizzard.  I went to edit my membership and changed it
to only get 1 daily e-mail, yet I am still getting every message
posted.  Any idea how I can fix this?

-Roman



[jQuery] Re: queue, dequeue, stop, and the endless mouseovers

2007-10-15 Thread Karl Swedberg

Olivier,

You're right! Thanks a lot for the suggestion.

When I tested in Firebug, it didn't look like there were a lot of  
"before" logs firing without the "after" logs, but even having it  
happen just a few times warrants the extra ":animated" condition in  
there.


Thanks again for testing and contributing! Much appreciated.


--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Oct 15, 2007, at 4:29 PM, Olivier Percebois-Garve wrote:


Hi
although there is many things unclear to me in animations,
":animated" seems to work right.

I suggest  the addition  of a case around  the code in your  
slideTabs() function : if (!$this.next().is(':animated'))


With console.log(), I noticed that over  events are being fired   
far more often than  necessary.
Using your menu, where  button are pretty small,  I  have normally  
the over event being fired 2 times
when the tab slides up only one time. On mine with bigger buttons  
its even more.
I found it important to reduce the number of events as low as the  
strict necessary, because cpu/memory
use can increase drastically, when doing mad mouse moving, when  
animation are chained or/and when they

run on  multiple elements

-Olivier

  var slideTabs = function() {
var $this = $(this);
console.log('before-');
if (!$this.next().is(':animated')){
resetClose();
console.log($this);
console.log('-after');
$this.parent().siblings().children('div.panel_body')
.animate({height: 'hide'}, 300, function() {
  $(this).prev().removeClass('visible');
});

if (idle == false) {
  $this.next(':hidden').animate({height: 'show'}, 300,  
function() {

$(this).prev().addClass('visible');
  });
}
}
  };


Karl Swedberg wrote:

Hi everyone,

Someone asked me to try to replicate something he saw here:
http://www.andrewsellick.com/examples/tabslideV2-mootools/

It looked pretty straightforward, and I was able to reproduce the  
main effect pretty easily -- except that the Moo tools one looks  
better because it doesn't try to slide up every tab when the mouse  
goes quickly over a number of them. You can see the problem with  
mine here (note, I changed the photo and tab colors to protect the  
innocent):

http://test.learningjquery.com/tabslide/

I know this little problem can be resolved with the hoverIntent  
plugin, but I'd like to gain a better understanding of the new  
animation methods in jQuery 1.2, and I thought that one of them  
would help, but I can't quite get things to work. I tried various  
combinations of .queue() and .dequeue() and .stop(), but nothing  
worked right.


So here is what I have now. As you can see, I also tried using the  
new :animated selector, and that almost worked, but not quite  
(which is why it's commented out now):


$(document).ready(function() {
  var $panelBodies = $('div.panel_body');
  $panelBodies.slice(1).hide();
  var slideTabs = function() {
var $this = $(this);
$this.parent().siblings().children('div.panel_body')
.animate({height: 'hide'}, 300, function() {
  $(this).prev().removeClass('visible');
});
  //  if ($panelBodies.filter(':animated').length < 2) {
  $this.next(':hidden').animate({height: 'show'}, 300,  
function() {

$(this).prev().addClass('visible');
  });
  //  }
  };

  $('div.panel_container > h3').mouseover(slideTabs);
});


Can anybody help this poor lost boy?

thanks,

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com









[jQuery] Re: Is there a way to wrap a table around content with jQuery?

2007-10-15 Thread Chris - Implied By Design

Thank you all for your responses, I ended up using Jeffrey's
suggestion, and it works well. It took me a while to figure out that
you couldn't add partial elements with the API. I'm glad that there's
a workaround! :)

Thanks again, folks!



[jQuery] Unexpected behaviour with interface sortable

2007-10-15 Thread Neff

I've only just started playing with JQuery the past two days so I've
probably missed something. I'm using the interface  plugin to create a
set of divs sortable by dragging. (I'm using interface rather than UI
because as I understand it UI only allows sortable lists).

The odd behaviour can bee seen in the example page at
http://www.fogcat.co.uk/jquery/gs5.html

If you grab the letter A and drag you can only move that item to the
top or the bottom, dragging C only allows you to select 1st secod or
last (but not all of those with the cursor in the right place).

However if I simply remove the line

containment:'parent',

from the initialisation of the sortable the dragging works fine
although it is no longer constrained. see  
http://www.fogcat.co.uk/jquery/gs5.html.
Is this a bug or have I missed something obvious



[jQuery] Re: Problems with jQuery loaded from JSP

2007-10-15 Thread Michael Geary

I can't tell you what is wrong without seeing the page (can you post links
to the working and broken versions?), but I can tell you this: There is no
such thing as a JSP page when we're talking about jQuery, JavaScript, CSS,
and other client-side technologies.

By the time the page reaches the browser, JSP is long out of the picture.
All the browser sees is the resulting HTML/JS/CSS files and their headers.

You mentioned that the JSP page is identical to the HTML page - just to
double-check, did you do a Save As (Web Page Only) on the JSP page in the
browser and diff that saved page with the HTML version?

If they are truly identical, then the only thing left is the headers.
Compare those with the working version and the problem should be in whatever
is different.

-Mike

> From: Iorlas
> 
> New to jQuery and have successfully managed to use the ajax 
> functionality from an HTML page. The problem is that I want 
> to use it from a JSP page. The JSP page is identical to the 
> HTML page, but it seems that jQuery stops working from the 
> JSP page. At least all JavaScript evaluation stops working in 
> this page (even if I only have a script inclusion of the 
> jquery.js file. If I remove the link to jQuery then my own 
> scripts start to work in the JSP page.
> 
> I am completely stomped. What am I doing wrong? Is there 
> something wrong with a header that can create this?
> 
> I am running JBoss 4.2.1.GA.
> 
> Has anyone seen the same behavior?



[jQuery] Re: Is there a way to wrap a table around content with jQuery?

2007-10-15 Thread Wizzud

An alternative ...

$(['Content'
   ,''
   ,'More Content'
   ,''].join(''))
   .insertAfter('#target').find('td:eq(1)').append($('#target'));

On Oct 15, 10:17 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> Tricky problem.  I found one way, but there MUST be an easier way.
> Demo:http://www.commadot.com/jquery/wrapTable.php#
>
> Maybe try the flydom plugin?
>
> Glen
>
> On 10/15/07, Chris - Implied By Design <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I'm running into some trouble trying to wrap a table around some
> > content. The table looks like this:
>
> > 
> > Content
> > [image to be wrapped around]
> > More Content
> > 
>
> > I've been experiementing with the most of the API DOM manipulation
> > functions, but none of them seem to do the trick. I'd like to use
> > something like wrap(), but wrap will inject the content into the first
> > , rather than the middle one. I tried putting a div in the middle
> > cell to see if jQuery would then consider it the deepest element, but
> > it still adds it to the first .
>
> > Any ideas? Thoughts would be much appreciated!
>
> > Thanks!
> > Chris



[jQuery] Re: Is there a way to wrap a table around content with jQuery?

2007-10-15 Thread Jeffrey Kretz

What do you think of this?

$('img.toWrap').each(function(i)
{
var img = $(this);
var table = $('Content\
More Content');
table.insertBefore(img);
table.find('td.imageHere').append(img);
});

JK

From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Glen Lipka
Sent: Monday, October 15, 2007 2:18 PM
To: jquery-en@googlegroups.com
Subject: [jQuery] Re: Is there a way to wrap a table around content with
jQuery?

Tricky problem.  I found one way, but there MUST be an easier way.
Demo: http://www.commadot.com/jquery/wrapTable.php#

Maybe try the flydom plugin?

Glen
On 10/15/07, Chris - Implied By Design < [EMAIL PROTECTED]> wrote:

Hello,

I'm running into some trouble trying to wrap a table around some 
content. The table looks like this:


Content
[image to be wrapped around]
More Content 


I've been experiementing with the most of the API DOM manipulation
functions, but none of them seem to do the trick. I'd like to use
something like wrap(), but wrap will inject the content into the first 
, rather than the middle one. I tried putting a div in the middle
cell to see if jQuery would then consider it the deepest element, but
it still adds it to the first .

Any ideas? Thoughts would be much appreciated! 

Thanks!
Chris




[jQuery] Re: How to suck web content from an iframe to a div

2007-10-15 Thread juliandormon


Thanks Mike,
That makes sense.
And what if it was the same domain? This is also the case with our new site.
I should have been more specific. I apologize.



malsup wrote:
> 
> 
> Julian,
> 
> You cannot access the contents of an IFrame which is sourced from a
> different domain.  This is part of the browser's cross-domain security
> model.
> 
> Mike
> 
> 
> On 10/15/07, juliandormon <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hoping anyone can help.
>> I use a custom scroll bar jquery plug-in which requires the content to be
>> within a DIV.
>>
>> Some of the content I want to load is from other web sites.
>>
>> I am pretty sure it is possible to load the content into a hidden iframe
>> and
>> then, once it has finished loading, suck the data in the iframe into my
>> div
>> and then apply my scrollbar plugin to the newly fitted div.
>>
>>
>> What's the proper method and plug-ins used to achieve this please?
>>
>> What are some of the pitfalls in doing this, if any?
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223056
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223518
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: How to suck web content from an iframe to a div

2007-10-15 Thread Mike Alsup

Julian,

You cannot access the contents of an IFrame which is sourced from a
different domain.  This is part of the browser's cross-domain security
model.

Mike


On 10/15/07, juliandormon <[EMAIL PROTECTED]> wrote:
>
>
> Hoping anyone can help.
> I use a custom scroll bar jquery plug-in which requires the content to be
> within a DIV.
>
> Some of the content I want to load is from other web sites.
>
> I am pretty sure it is possible to load the content into a hidden iframe and
> then, once it has finished loading, suck the data in the iframe into my div
> and then apply my scrollbar plugin to the newly fitted div.
>
>
> What's the proper method and plug-ins used to achieve this please?
>
> What are some of the pitfalls in doing this, if any?
> --
> View this message in context: 
> http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223056
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.
>
>


[jQuery] Re: Beginner problem: Link is not working (JQuery Cycle Plugin)

2007-10-15 Thread Mike Alsup

Tom,

"toggle" prevents the default event action so the anchor is not
followed when you click it.

Mike


On 10/12/07, tlob <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I am working with the fantastic JQuery Cycle Plugin. Thank you very
> much for creating such great librarys!
> I am almost there But I have a very basic problem.
> Start/stopping the slideshow is fine with click on thumbnails/pictures/
> slideshow.
> But when you click on the thumbnails, the link is not working.
>
> http://siggibucher.com/preview/test.php
>
> 1. I dont understand why. Can you explain that?
> 2. How can I change that? ;-)
>
>
> THX in advance, have a nice weekend
> tom
>
>


[jQuery] Re: creating drop down menus with JQuery?

2007-10-15 Thread Chris Jordan
check out jdMenu . It's pretty
cool.

Chris


On 10/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> Is there a plug-in that allows for menu creatio in JQuery?
> Specifically, I'm looking for something where when you roll over an
> arrow graphic, a menu will pop up beneath it.  I do not need submenus
> to pull out over individual menu items.
>
> Thanks for any advice, - Dave
>
>


-- 
http://cjordan.us


[jQuery] creating drop down menus with JQuery?

2007-10-15 Thread [EMAIL PROTECTED]

Hi,

Is there a plug-in that allows for menu creatio in JQuery?
Specifically, I'm looking for something where when you roll over an
arrow graphic, a menu will pop up beneath it.  I do not need submenus
to pull out over individual menu items.

Thanks for any advice, - Dave



[jQuery] How to suck web content from an iframe to a div

2007-10-15 Thread juliandormon


Hoping anyone can help.
I use a custom scroll bar jquery plug-in which requires the content to be
within a DIV.

Some of the content I want to load is from other web sites.

I am pretty sure it is possible to load the content into a hidden iframe and
then, once it has finished loading, suck the data in the iframe into my div
and then apply my scrollbar plugin to the newly fitted div.


What's the proper method and plug-ins used to achieve this please?

What are some of the pitfalls in doing this, if any?
-- 
View this message in context: 
http://www.nabble.com/How-to-suck-web-content-from-an-iframe-to-a-div-tf4630767s27240.html#a13223056
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates

2007-10-15 Thread koollx

$(parent).append(state.html)

did the trick - thanks a ton polyrythmic!





[jQuery] Re: ANNOUCE: jQuery lightBox plugin

2007-10-15 Thread Guy Fraser

Kia Niskavaara wrote:
> Maby you can use the data: URI kitchen to construct your own data: URLs?
>
> Like this:
> logo.src = 
> 'data:image/gif;base64,R0lGODlhDQAOAJEAANno6wBmZgAAACH5BAAA'+
>  
> 'LAANAA4AQAIjjI8Iyw3GhACSQecutsFV3nzgNi7SVEbo06lZa66LRib2UQAAOw%3D%3D';
>
> More info:
> http://diveintogreasemonkey.org/patterns/add-image.html

Not compatible with all browsers IIRC...


[jQuery] Re: Ajax tabs detect automatically

2007-10-15 Thread Klaus Hartl

On 15 Okt., 20:05, zorba <[EMAIL PROTECTED]> wrote:
> last question,
>
> it seems that  triggerTab() is no more useful.
> How can I replace it please?
>
> thanks

It has changed to tabsClick() in Tabs 3...

Documentation: http://docs.jquery.com/UI/Tabs


--Klaus




[jQuery] Problems with jQuery loaded from JSP

2007-10-15 Thread Iorlas

Hi!

New to jQuery and have successfully managed to use the ajax
functionality from an HTML page. The problem is that I want to use it
from a JSP page. The JSP page is identical to the HTML page, but it
seems that jQuery stops working from the JSP page. At least all
JavaScript evaluation stops working in this page (even if I only have
a script inclusion of the jquery.js file. If I remove the link to
jQuery then my own scripts start to work in the JSP page.

I am completely stomped. What am I doing wrong? Is there something
wrong with a header that can create this?

I am running JBoss 4.2.1.GA.

Has anyone seen the same behavior?

--
Magnus



[jQuery] Re: Jquery Plugin for TinyMCE

2007-10-15 Thread Sam Sherlock
have you got a copy of previous versions of jQ?

Have you tried using the compatibly plugin ?

suggestions not sureties.  theres a editor being made as part of UI but I
guess that might take a while

On 15/10/2007, wattaka <[EMAIL PROTECTED]> wrote:
>
>
> I´ll need some help on this because I´m getting errors:
>
> I saved this from the page as tinymce.js
>
> // tiny MCE -
> //jQuery plugin for accessible, unobtrusive WYSIWYG HTML editing
> // v .1
> // by Alton Crossley
> // http://www.nogahidebootstrap.com/jtinymce/
>
> $.fn.tinymce = function(options)
> {
> return this.each(function()
> {
> preString = "";
> postString = " style='float:right' onclick="toogleEditorMode('" + this.id +
> "');">HTML";
> $(this).wrap(preString + postString);
> //alert(this.id + '' + $(this).html() + '');
> //alert(this.id + 'Width:' + $(this).css("width") + 'Height:'
> + $(this).css("height"));
> });
> }
>
>
> And the I tried to inoke tinyMCE by doing this:
>
> $(document).ready(function(){
>
> $('#test_textarea').tinymce();
>
> });
>
>
>
> I get these errors:
>
> 1. $("#test_textarea").tinymce is not a function
> 2. missing ; before statement
>
> is there anything else that I have to do? Is the plugin Jquery 1.2.1
> compatible?
>
>
> Thansk
>
>
>
>


[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates

2007-10-15 Thread polyrhythmic


> Should I just use DOM's createElement() and appendChild() directly?
> Or use innerHTML?
> And would it execute 

[jQuery] Re: Is there a way to wrap a table around content with jQuery?

2007-10-15 Thread Glen Lipka
Tricky problem.  I found one way, but there MUST be an easier way.
Demo: http://www.commadot.com/jquery/wrapTable.php#

Maybe try the flydom plugin?

Glen

On 10/15/07, Chris - Implied By Design <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I'm running into some trouble trying to wrap a table around some
> content. The table looks like this:
>
> 
> Content
> [image to be wrapped around]
> More Content
> 
>
> I've been experiementing with the most of the API DOM manipulation
> functions, but none of them seem to do the trick. I'd like to use
> something like wrap(), but wrap will inject the content into the first
> , rather than the middle one. I tried putting a div in the middle
> cell to see if jQuery would then consider it the deepest element, but
> it still adds it to the first .
>
> Any ideas? Thoughts would be much appreciated!
>
> Thanks!
> Chris
>
>


[jQuery] Re: queue, dequeue, stop, and the endless mouseovers

2007-10-15 Thread Olivier Percebois-Garve

Hi
although there is many things unclear to me in animations,
":animated" seems to work right.

I suggest  the addition  of a case around  the code in your slideTabs() 
function : if (!$this.next().is(':animated'))


With console.log(), I noticed that over  events are being fired  far 
more often than  necessary.
Using your menu, where  button are pretty small,  I  have normally the 
over event being fired 2 times
when the tab slides up only one time. On mine with bigger buttons its 
even more.
I found it important to reduce the number of events as low as the strict 
necessary, because cpu/memory
use can increase drastically, when doing mad mouse moving, when 
animation are chained or/and when they

run on  multiple elements

-Olivier

 var slideTabs = function() {
   var $this = $(this);
   console.log('before-');
   if (!$this.next().is(':animated')){
   resetClose();   
   console.log($this);
   console.log('-after');   
   $this.parent().siblings().children('div.panel_body')

   .animate({height: 'hide'}, 300, function() {
 $(this).prev().removeClass('visible');
   });

   if (idle == false) {

 $this.next(':hidden').animate({height: 'show'}, 300, function() {
   $(this).prev().addClass('visible');
 });
   }
   }
 };


Karl Swedberg wrote:

Hi everyone,

Someone asked me to try to replicate something he saw here:
http://www.andrewsellick.com/examples/tabslideV2-mootools/

It looked pretty straightforward, and I was able to reproduce the main 
effect pretty easily -- except that the Moo tools one looks better 
because it doesn't try to slide up every tab when the mouse goes 
quickly over a number of them. You can see the problem with mine here 
(note, I changed the photo and tab colors to protect the innocent):

http://test.learningjquery.com/tabslide/

I know this little problem can be resolved with the hoverIntent 
plugin, but I'd like to gain a better understanding of the new 
animation methods in jQuery 1.2, and I thought that one of them would 
help, but I can't quite get things to work. I tried various 
combinations of .queue() and .dequeue() and .stop(), but nothing 
worked right. 

So here is what I have now. As you can see, I also tried using the new 
:animated selector, and that almost worked, but not quite (which is 
why it's commented out now):


$(document).ready(function() {
  var $panelBodies = $('div.panel_body');
  $panelBodies.slice(1).hide();
  var slideTabs = function() {
var $this = $(this);
$this.parent().siblings().children('div.panel_body')
.animate({height: 'hide'}, 300, function() {
  $(this).prev().removeClass('visible');
});
  //  if ($panelBodies.filter(':animated').length < 2) {
  $this.next(':hidden').animate({height: 'show'}, 300, 
function() {

$(this).prev().addClass('visible');
  });
  //  } 
  };
 
  $('div.panel_container > h3').mouseover(slideTabs);

});


Can anybody help this poor lost boy? 


thanks,

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com







[jQuery] Re: Duplicate IDs

2007-10-15 Thread Karl Swedberg

Hi chrisandy,

No need to apologize. We're glad to help.

You can apply a clueTip to anything you want. It doesn't have to  
reference an ID. For example, if you want to apply it to all links  
inside , you could do it like this:


$('ul.uk a').cluetip({sticky: true});

-- and put in any other options you want in there.

Let me know if you have any further questions.

--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Oct 15, 2007, at 1:30 PM, chrisandy wrote:



Please forgive me but I'm very new to all this and was just building a
page to handle multiple instances of the clueTip 'sticky' effect
(example 4 on the demo page).

The big problem I get is that I have to use:


The EstelleThe Estelle is a lovely 3 bedroom property with more
details to go in here...

The EstelleThe Estelle is a lovely 3 bedroom property with more
details to go in here...


Obviously duplicate IDs is a no no and only the first item in the list
works so how do I get around this?

Many thanks in advance.





[jQuery] Is there a way to wrap a table around content with jQuery?

2007-10-15 Thread Chris - Implied By Design

Hello,

I'm running into some trouble trying to wrap a table around some
content. The table looks like this:


Content
[image to be wrapped around]
More Content


I've been experiementing with the most of the API DOM manipulation
functions, but none of them seem to do the trick. I'd like to use
something like wrap(), but wrap will inject the content into the first
, rather than the middle one. I tried putting a div in the middle
cell to see if jQuery would then consider it the deepest element, but
it still adds it to the first .

Any ideas? Thoughts would be much appreciated!

Thanks!
Chris



[jQuery] Get date from table cell

2007-10-15 Thread jy_nl

Hi all,

I have a html table which is generated with some php scripts. It is a
list of events. One of the cells of each row contains a date (in the
format dd-mm-). What I want now is to select all the events (rows)
which have been done and I want to assign a class to each of such a
row.

The problem here is of course the selector part. Is this possible with
jQuery, and if so, could somebody help me out with the code? Or should
this be done with php programming?

Thanks!

Joey



[jQuery] Re: Ajax tabs detect automatically

2007-10-15 Thread zorba

last question,

it seems that  triggerTab() is no more useful.
How can I replace it please?

thanks




[jQuery] Duplicate IDs

2007-10-15 Thread chrisandy

Please forgive me but I'm very new to all this and was just building a
page to handle multiple instances of the clueTip 'sticky' effect
(example 4 on the demo page).

The big problem I get is that I have to use:


The EstelleThe Estelle is a lovely 3 bedroom property with more
details to go in here...

The EstelleThe Estelle is a lovely 3 bedroom property with more
details to go in here...


Obviously duplicate IDs is a no no and only the first item in the list
works so how do I get around this?

Many thanks in advance.



[jQuery] Re: jquery version of YUI Buttons?

2007-10-15 Thread owen

Coming back to this issue, I spent some time today playing around with
ext's toolbar with menus example: 
http://extjs.com/deploy/dev/examples/menu/menus.html.
Seems to work really well, but writes everything (including a table!)
from javascript rather than working off of existing markup.

But if all you need is a button and/or a button with a drop-down menu,
it seems like you could do it with a combination of some CSS-button
styling and ClickMenu

> I've started a  conversation with the developer about extending his plugin to 
> support
> this type of menu system.  If you could chime-in with your suggestions, I'd 
> appreciate it.
>
> Blog comments at:  http://p.sohei.org/jquery-plugins/clickmenu/#comments

I finally did, suggesting a combination of ClickMenu and this
technique: 
http://www.monc.se/kitchen/59/scalable-css-buttons-using-png-and-background-colors.
I played around a little with the idea myself, and it seems like the
two primary hurdles are selecting only the "top-level" links, and
positioning the drop-down properly when the link is styled as a
button. I didn't get anywhere with it myself, which isn't saying much.
But I thought I'd throw it out there in case others might be
interested.

  -- Owen



[jQuery] Re: Ajax tabs detect automatically

2007-10-15 Thread zorba

well,
you're right, the way I use tabs in these pages is not exactly what it
was built for.
I use it as a Client-side pagination. Works nice that way also.

So I got confused when I finally found the reasons of non-working
upgrade, and I apologise that you lost your time because of me.

There were two problems.
First of all I made a mistake :in the UI version, you're supposed to
apply the tabs method to the unordered list and forget the old
#container.

Then I built my page putting the shadetabs (used as pager), after and
not before the .tabcontent.
if you combine these two things you obtain a very amazing and destroy
result.

Anyway, thinking about this misadventure, I decided to use a script I
found in my "go-to-bed-book", the great "learning jquery" of Karl
Swedberg and Jonathan Chaffer, to build both pagination and table
sorting.

Thanks a lot for your help, and for your great contribution to jQuery.



[jQuery] [NEWS] liScroll Plugin

2007-10-15 Thread GianCarlo Mingati

Hi all.
http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html
This is my scrolling news ticker plugin for jQuery.

Ciao
GC



[jQuery] Re: [NEWS] Coda-Slider Plugin

2007-10-15 Thread Howard Jones


Rey Bango wrote:


It could be that he didn't have Safari 2.0 to work with. I'm sure if 
you contact him and offer to help him test, he would be very receptive 
and appreciative of your offer.


Rey...
Sorry, that did sound more bitchy that it should have, didn't it? The 
second remark (about IE5) wasn't directly related to this plugin, just 
to the number of things I've come across lately (including my own work) 
that work in e.g. Firefox but fail quietly in Safari, where it's a pain 
to debug them. Last I checked, jQuery UI suffered with this even (yep - 
the download box on the site is still hosed for me).


Is there any resource for things to avoid in jQuery (or JS generally) to 
have a project work with Safari? I guess this is all down to a few DOM 
objects being implemented differently...


Howie

(happy to help test on Safari, BTW)


[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates

2007-10-15 Thread Jeffrey Kretz

I'm just throwing this out here -- haven't tested this for performance and
this may be way off base for what you need.  So here goes nothing.

What if you:

1. Created a hidden div on the page (style="display:none")
2. Have the ajax call return updates as html, with the changes having a new
class, such as "changed".
3. Appended the new updates to the div: div.html(ajaxResults);
4. Iterate through the changes like this:
div.find('.changed').each(function(i){update_element(this);});

What do you think?

JK

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of koollx
Sent: Monday, October 15, 2007 9:29 AM
To: jQuery (English)
Subject: [jQuery] Re: Extremely poor performance of jQuery on AJAX partial
page updates


Thanks for your suggestion. I think it may help but it won't
completely solve the problem. Let me give a little background on what
I'm actually trying to do. In response to an Ajax call the server
returns an array of component updates that need to be applied to the
page. Updates include DELETE, INSERT, UPDATE. Delete is easy, insert
and update is where the performance is bad. For each component the
server provides component id in DOM, it's parent id and the HTML
markup, which can include nested 

[jQuery] Re: [NEWS] Coda-Slider Plugin

2007-10-15 Thread Rey Bango


It could be that he didn't have Safari 2.0 to work with. I'm sure if you 
contact him and offer to help him test, he would be very receptive and 
appreciative of your offer.


Rey...

Howard Jones wrote:


Although ironically it doesn't work on Safari 2.0 , unlike Panic's 
version and the software it advertises.


When did Safari become the new IE5?

Glen Lipka wrote:

Very nice. :)

Glen

On 10/15/07, *Andy Matthews* <[EMAIL PROTECTED] 
> wrote:



That's really nice. Works well in IE7/PC. Looks really nice too,

-Original Message-
From: jquery-en@googlegroups.com
 [mailto:
jquery-en@googlegroups.com ] On
Behalf Of Rey Bango
Sent: Sunday, October 14, 2007 11:39 PM
To: jQuery Discussion
Subject: [jQuery] [NEWS] Coda-Slider Plugin


Found a jQuery version of the Coda Slider:

http://www.ndoherty.com/demos/coda-slider/

I got it from the following blog:

http://www.toolsoup.com/slider-or-glider-using-javascript/

Rey...








[jQuery] Re: How to bind data to the ajax callback function?

2007-10-15 Thread Andy Matthews

Probably when Apple tried to get into the browser business too. 

-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Wizzud
Sent: Monday, October 15, 2007 12:24 PM
To: jQuery (English)
Subject: [jQuery] Re: How to bind data to the ajax callback function?


It's not ambiguous at all.
Your problem is not with the $.get() but with the code around it.
$.get() does exactly what it is intended to do - it fetches a single 'page'
(of some sort) and provides you with the mechanism for handling that page
when successfully retrieved.
You are trying to handle multiple $.get()s in a single loop, with each
retrieved 'page' (presumably) being handled differently, and in the process
of doing so you're getting the scope of some variables mixed up. That's all.

If you really want to minimise it, and you really only have a loop of 2,
then ...

var url='http://foo.bar/?param=';
$.each([0,1],function(i,j){
$.get(url+j, function(html){
alert(j);
  });
  });

On Oct 14, 2:10 pm, arphenlin <[EMAIL PROTECTED]> wrote:
> It's so ambagious. I really hope jQuery can provide a *userData* 
> parameter like this:
> jQuery.get( url, [data], [callback], [userData] )
>
> Then I can achieve my goal with this way:
> for(var i=0; i<2; i++){
> $.get(url+i, function(html, userData){
> doit(html, userData['tag']); // userData was bound to ajax 
> callback
> }, {'tag': i});
>
> }
> Wizzud wrote:
> > var url='http://foo.bar/?param=';
> > for(var i=0; i<2; i++){
> > submitAjax(i);
> > }
> > function submitAjax(i){
> > $.get(url+i, function(html){
> > doit(html, i);
> > });
> > }
> > function doit(html, tag){
> > alert(tag);
> > }
>
> > On Oct 13, 11:04 am, arphenlin <[EMAIL PROTECTED]> wrote:
> > > Below is an example to use jQuery.get() to get some html data.
> > > I expect that "0", "1" (or "1", "0") are displayed, however, it 
> > > displayed "2", "2".
> > > How can I do?
>
> > > var url='http://foo.bar/?param=';
> > > for(var i=0; i<2; i++){
> > > $.get(url+i, function(html){
> > > doit(html, i); // bind 'i' to the callback function
> > > });
>
> > > }
>
> > > function doit(html, tag){
> > > alert(tag);
>
> > > }






[jQuery] Re: Beginner problem: Link is not working (JQuery Cycle Plugin)

2007-10-15 Thread Tobias Parent


Umm... What exactly do you mean by the link is not working? The href 
points to a non-existent in-page anchor point, but it *is* doing what 
you're asking, by toggling the slideshow on and off. I'm assuming you 
want to point the slideshow to the appropriate clicked image, right? In 
this case, you might want to get the index of the anchor (not sure how), 
then cycle to the appropriate li (i.e., with the matching index).


Purely hypothetical, but that's what I'm seeing.
-Toby

tlob wrote:

anyone?

On Oct 12, 3:16 pm, tlob <[EMAIL PROTECTED]> wrote:
  

Hello

I am working with the fantastic JQuery Cycle Plugin. Thank you very
much for creating such great librarys!
I am almost there But I have a very basic problem.
Start/stopping the slideshow is fine with click on thumbnails/pictures/
slideshow.
But when you click on the thumbnails, the link is not working.

http://siggibucher.com/preview/test.php

1. I dont understand why. Can you explain that?
2. How can I change that? ;-)

THX in advance, have a nice weekend
tom




  




[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates

2007-10-15 Thread koollx

Thanks for your suggestion. I think it may help but it won't
completely solve the problem. Let me give a little background on what
I'm actually trying to do. In response to an Ajax call the server
returns an array of component updates that need to be applied to the
page. Updates include DELETE, INSERT, UPDATE. Delete is easy, insert
and update is where the performance is bad. For each component the
server provides component id in DOM, it's parent id and the HTML
markup, which can include nested 

[jQuery] Re: [NEWS] Coda-Slider Plugin

2007-10-15 Thread Jeferson Koslowski
Yep, its very nice and its already in the plugins page (
http://jquery.com/plugins/project/Coda-Slider). Im waiting to when its
become compatible with jquery 1.2 (as the author says in the limitations
tab).

On 10/15/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
>
> That's really nice. Works well in IE7/PC. Looks really nice too,
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Rey Bango
> Sent: Sunday, October 14, 2007 11:39 PM
> To: jQuery Discussion
> Subject: [jQuery] [NEWS] Coda-Slider Plugin
>
>
> Found a jQuery version of the Coda Slider:
>
> http://www.ndoherty.com/demos/coda-slider/
>
> I got it from the following blog:
>
> http://www.toolsoup.com/slider-or-glider-using-javascript/
>
> Rey...
>
>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery (English)" group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates

2007-10-15 Thread koollx

Thanks for the suggestion. I can try it but I think it won't do the
same thing I was doing earlier. Let me give a little background on my
algorithm. The server sends a list of changes to the page and the
client script has to apply. Changes can be delete, insert and update.
The markup sent by the server includes 

[jQuery] Re: JQuery Expand/Collapse Troubleshooting

2007-10-15 Thread Brian Talbot

Hey Glen,

Thanks for the feedback. My bad about overbloating things and asking a
bit too much (as well as the three repeat posts - it wasn't on
purpose) :o)
I've simplified the example and it looks like things work in this
example - http://brian-talbot.com/inventingroom/ng-jquery-expand/

What that means is that all of the other stuff on the first example is
not playing well with JQuery. I'll take your advice and go "brick-by-
brick" through things.

Thanks again for the support!
-- Brian


On Oct 15, 12:31 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote:
> It's hard to follow all the details.  Maybe post a simpler example.
> Trim down the page until all that is left is the problem.  No graphics, no
> excess html.
> Literally, delete stuff one at a time until you can demonstrate the simplest
> form of the issue.
>
> We are here for you, but you gotta meet us halfway. :)
>
> Glen
>
> On 10/15/07, briantalbot <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi All,
>
> > I'm having a bit of trouble implementing a show/hide bit of JQuery
> > JavaScript and was wondering if anyone had any ideas or advice that
> > may help.
>
> > On this pagehttp://tinyurl.com/33wksr(my apologies for the missing
> > content and overall clunkiness of the page - its been copied out of
> > the NG CMS that doesn't support web standards just yet for
> > troubleshooting.), I have a JQuery script (found here -
> >http://tinyurl.com/354fk2)
> > that is controlling the visual display of elements within a  > id="article">.  This seems to be working as needed in Firefox
> > (PC and Mac) and Safari.
>
> > The issue I'm running into is that in Internet Explorer 6 and 7, the
> > JQuery script doesn't seem to run or affect the HTML within  > id="article"> as it should. At best, I've gotten the behavior to
> > happen sporadically where sometimes the script will work and then is
> > cached in the IE browser and other pages that use this same JQuery
> > script behave properly. Most of the time however, the HTML and page
> > are not altered by the JQuery code.
>
> > I know there are a ton of other JS calls on this page as well as a lot
> > of elements (non-semantic markup, tons of tables) in the DOM. Could
> > either of these be affecting how/when IE loads the DOM and the JQuery
> > instructions?
>
> > * Has anyone else run into this or something similar?
> > * Does anyone have any ideas about what may be causing the problem?
> > * My understanding was that JQuery attempted to make DOM and JS load
> > timing universal across browsers, are there any cases where this
> > wouldn't happen with IE?
>
> > 
>
> > On a separate note, due to sites like this being in a CMS, who's
> > templating engine we have little control over, we'd like to abstract
> > this out a bit more and call these two specific JavaScript files
> > (jquery.js and science.js) from one JavaScript file that we can add
> > to. I have an example of a page referencing that here -
> >http://tinyurl.com/2yfg69
>
> > This page is using the following JavaScript to add the needed 

[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates

2007-10-15 Thread koollx

Thanks for your suggestion. I think it may help but it won't
completely solve the problem. Let me give a little background on what
I'm actually trying to do. In response to an Ajax call the server
returns an array of component updates that need to be applied to the
page. Updates include DELETE, INSERT, UPDATE. Delete is easy, insert
and update is where the performance is bad. For each component the
server provides component id in DOM, it's parent id and the HTML
markup, which can include nested 

[jQuery] Is this valid JSON?

2007-10-15 Thread Frank Peterson

[
{
"ads": true,
"content_slug": "just-some-title"
}
]



[jQuery] Re: Extremely poor performance of jQuery on AJAX partial page updates

2007-10-15 Thread polyrhythmic

I was only suggesting PasteMonkey because you had a lot of HTML to
paste and a large amount of code is hard to read through Groups,
Groups fudges the formatting and doesn't do syntax highlighting.
Plus, it's a jQuery project :-).

The problem is in the HTML, kind of.  When you create a DOM element
(or set of elements) with plain text HTML jQuery will be forced to run
that regex against all of it.  There is no way around it, in order to
allow jQuery to make sure it's parsing HTML and not a selector, the
regex has to find HTML tags or special characters in the text - even
if its 1000 words of plaintext and just one  tag.  The problem
is that you're trying to load a very large amount of text, and making
jQuery figure out that it's HTML.  The easiest workaround is as Wizzud
suggested - if you tell jQuery that it's HTML by using .html(), you
skip the regex.  Looking at the jQuery source, using appendTo is fine
also*, just don't use $(state.html) - there's no need to make a jQuery
object from the HTML, since jQuery can append anything -- text, DOM
elements, HTML, etc.

*Example:
$(parent).append(state.html);

If you do need a jQuery object from the HTML, for manipulation or
parsing, there are quick ways to do that, too.  Let us know how this
works out.

Charles
doublerebel.com



On Oct 13, 1:33 pm, koollx <[EMAIL PROTECTED]> wrote:
> I can use PasteMonkey but I don't see how it can help in this case -
> what exactly do you want me to paste in it? The line that takes over
> 20 seconds to execute is the regexp applied to the HTML that's passed
> to jQuery constructor. There is no point in editing HTML (I think)
> because it is automatically generated by the server and is very
> dynamic. I just pasted one example of it. There is no way to predict
> all possible combinations of that HTML.
>
> The issue I think is in regexp, or IE performance when applying
> regexp. The regexp is in jquery.js.
>
> Are you suggesting that the problem is in the HTML markup I'm trying
> to insert into the page?
>
> On Oct 12, 7:12 pm, polyrhythmic <[EMAIL PROTECTED]> wrote:
>
> > Alex,
>
> > May I recommend to you PasteMonkey?
>
> >http://pastemonkey.org/
>
> > Charles
> > doublerebel.com
>
> > On Oct 12, 11:42 am, koollx <[EMAIL PROTECTED]> wrote:
>
> > > I'm trying to use jQuery 1.2.1 to add AJAX functionality to my web
> > > application. I am using jQuery Form plugin to submit te form via AJAX
> > > and have a server-side algorithm that returns page updates. The server
> > > returns a JSON array with HTML elements to be updated and then I loop
> > > through that array and process each item. For update, I first remove
> > > the existing DOM element, then recreate it using jQuery constructor,
> > > and then append it to the parent. It works find in FireFox, but in IE
> > > the performance is horrendous. It takes 25 seconds in IE6 and IE7
> > > pretty much hangs. I traced the delay to the following line of code in
> > > jQuery init method:
>
> > > var m = quickExpr.exec(selector);
>
> > > So it seems that jQuery is to blame for the performance. Is there
> > > something I can do to improve it? Is this a bug/issue that needs to be
> > > resolved? I'd like to help fix it but I'm not familiar with jQuery
> > > design well enough to know why the regexp is there and how we can
> > > simplify/remove it. Here's my update code:
>
> > > var $component = $(state.html);
> > > $component.appendTo(parent);
>
> > > And the HTML that takes particularly long is pasted below (it may look
> > > like a large page but it isn't. It loads into the browser without
> > > jQuery AJAX in less then a second):
>
> > >> > \"position:absolute;left:0px;top:46px;width:884px;height:644px\"
> > > tabbedPane=\"true\">
> > >   
> > >   Button
> > > Demo
> > >   Source
> > > Code
> > >   
> > >> > \"position:absolute;left:2px;top:26px;width:874px;height:585px\"> > > id=\"JPanel12136681\" style=\"position:absolute;left:2px;top:1px;width:
> > > 874px;height:611px;clip:rect(0px 874px 611px 0px)\" class=\" border\">
> > >  > > \"position:absolute;left:2px;top:2px;width:874px;height:
> > > 611px;clip:rect(0px 874px 611px 0px)\">
> > >  > > \"position:absolute;left:0px;top:0px;width:874px;height:611px\"
> > > tabbedPane=\"true\">
> > > 
> > >  > > tab-0\">Buttons
> > >  > > tab-1\">Radio Buttons
> > >  > > tab-2\">Check Boxes
> > > 
> > >  > > \"position:absolute;left:2px;top:26px;width:868px;height:555px\"> > > id=\"JPanel5403403\" style=\"position:absolute;left:2px;top:1px;width:
> > > 868px;height:581px;clip:rect(0px 868px 581px 0px)\">
> > >> > \"position:absolute;left:5px;top:5px;width:548px;height:
> > > 567px;clip:rect(0px 548px 567px 0p

[jQuery] Re: How to bind data to the ajax callback function?

2007-10-15 Thread Wizzud

It's not ambiguous at all.
Your problem is not with the $.get() but with the code around it.
$.get() does exactly what it is intended to do - it fetches a single
'page' (of some sort) and provides you with the mechanism for handling
that page when successfully retrieved.
You are trying to handle multiple $.get()s in a single loop, with each
retrieved 'page' (presumably) being handled differently, and in the
process of doing so you're getting the scope of some variables mixed
up. That's all.

If you really want to minimise it, and you really only have a loop of
2, then ...

var url='http://foo.bar/?param=';
$.each([0,1],function(i,j){
$.get(url+j, function(html){
alert(j);
  });
  });

On Oct 14, 2:10 pm, arphenlin <[EMAIL PROTECTED]> wrote:
> It's so ambagious. I really hope jQuery can provide a *userData*
> parameter like this:
> jQuery.get( url, [data], [callback], [userData] )
>
> Then I can achieve my goal with this way:
> for(var i=0; i<2; i++){
> $.get(url+i, function(html, userData){
> doit(html, userData['tag']); // userData was bound to ajax
> callback
> }, {'tag': i});
>
> }
> Wizzud wrote:
> > var url='http://foo.bar/?param=';
> > for(var i=0; i<2; i++){
> > submitAjax(i);
> > }
> > function submitAjax(i){
> > $.get(url+i, function(html){
> > doit(html, i);
> > });
> > }
> > function doit(html, tag){
> > alert(tag);
> > }
>
> > On Oct 13, 11:04 am, arphenlin <[EMAIL PROTECTED]> wrote:
> > > Below is an example to use jQuery.get() to get some html data.
> > > I expect that "0", "1" (or "1", "0") are displayed, however, it
> > > displayed "2", "2".
> > > How can I do?
>
> > > var url='http://foo.bar/?param=';
> > > for(var i=0; i<2; i++){
> > > $.get(url+i, function(html){
> > > doit(html, i); // bind 'i' to the callback function
> > > });
>
> > > }
>
> > > function doit(html, tag){
> > > alert(tag);
>
> > > }


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"jQuery (English)" group.
To post to this group, send email to jquery-en@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-en?hl=en
-~--~~~~--~~--~--~---



[jQuery] Re: [NEWS] Coda-Slider Plugin

2007-10-15 Thread Howard Jones


Although ironically it doesn't work on Safari 2.0 , unlike Panic's 
version and the software it advertises.


When did Safari become the new IE5?

Glen Lipka wrote:

Very nice. :)

Glen

On 10/15/07, *Andy Matthews* <[EMAIL PROTECTED] 
> wrote:



That's really nice. Works well in IE7/PC. Looks really nice too,

-Original Message-
From: jquery-en@googlegroups.com
 [mailto:
jquery-en@googlegroups.com ] On
Behalf Of Rey Bango
Sent: Sunday, October 14, 2007 11:39 PM
To: jQuery Discussion
Subject: [jQuery] [NEWS] Coda-Slider Plugin


Found a jQuery version of the Coda Slider:

http://www.ndoherty.com/demos/coda-slider/

I got it from the following blog:

http://www.toolsoup.com/slider-or-glider-using-javascript/

Rey...







[jQuery] Re: [NEWS] Coda-Slider Plugin

2007-10-15 Thread Glen Lipka
Very nice. :)

Glen

On 10/15/07, Andy Matthews <[EMAIL PROTECTED]> wrote:
>
>
> That's really nice. Works well in IE7/PC. Looks really nice too,
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Rey Bango
> Sent: Sunday, October 14, 2007 11:39 PM
> To: jQuery Discussion
> Subject: [jQuery] [NEWS] Coda-Slider Plugin
>
>
> Found a jQuery version of the Coda Slider:
>
> http://www.ndoherty.com/demos/coda-slider/
>
> I got it from the following blog:
>
> http://www.toolsoup.com/slider-or-glider-using-javascript/
>
> Rey...
>
>
>


[jQuery] Re: Beginner problem: Link is not working (JQuery Cycle Plugin)

2007-10-15 Thread tlob

anyone?

On Oct 12, 3:16 pm, tlob <[EMAIL PROTECTED]> wrote:
> Hello
>
> I am working with the fantastic JQuery Cycle Plugin. Thank you very
> much for creating such great librarys!
> I am almost there But I have a very basic problem.
> Start/stopping the slideshow is fine with click on thumbnails/pictures/
> slideshow.
> But when you click on the thumbnails, the link is not working.
>
> http://siggibucher.com/preview/test.php
>
> 1. I dont understand why. Can you explain that?
> 2. How can I change that? ;-)
>
> THX in advance, have a nice weekend
> tom



[jQuery] Re: JQuery Expand/Collapse Troubleshooting

2007-10-15 Thread Glen Lipka
It's hard to follow all the details.  Maybe post a simpler example.
Trim down the page until all that is left is the problem.  No graphics, no
excess html.
Literally, delete stuff one at a time until you can demonstrate the simplest
form of the issue.

We are here for you, but you gotta meet us halfway. :)

Glen


On 10/15/07, briantalbot <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi All,
>
> I'm having a bit of trouble implementing a show/hide bit of JQuery
> JavaScript and was wondering if anyone had any ideas or advice that
> may help.
>
> On this page http://tinyurl.com/33wksr (my apologies for the missing
> content and overall clunkiness of the page - its been copied out of
> the NG CMS that doesn't support web standards just yet for
> troubleshooting.), I have a JQuery script (found here -
> http://tinyurl.com/354fk2)
> that is controlling the visual display of elements within a  id="article">.  This seems to be working as needed in Firefox
> (PC and Mac) and Safari.
>
> The issue I'm running into is that in Internet Explorer 6 and 7, the
> JQuery script doesn't seem to run or affect the HTML within  id="article"> as it should. At best, I've gotten the behavior to
> happen sporadically where sometimes the script will work and then is
> cached in the IE browser and other pages that use this same JQuery
> script behave properly. Most of the time however, the HTML and page
> are not altered by the JQuery code.
>
> I know there are a ton of other JS calls on this page as well as a lot
> of elements (non-semantic markup, tons of tables) in the DOM. Could
> either of these be affecting how/when IE loads the DOM and the JQuery
> instructions?
>
> * Has anyone else run into this or something similar?
> * Does anyone have any ideas about what may be causing the problem?
> * My understanding was that JQuery attempted to make DOM and JS load
> timing universal across browsers, are there any cases where this
> wouldn't happen with IE?
>
> 
>
> On a separate note, due to sites like this being in a CMS, who's
> templating engine we have little control over, we'd like to abstract
> this out a bit more and call these two specific JavaScript files
> (jquery.js and science.js) from one JavaScript file that we can add
> to. I have an example of a page referencing that here -
> http://tinyurl.com/2yfg69
>
> This page is using the following JavaScript to add the needed 

[jQuery] Re: One-liner that accelerates JavaScript on IE

2007-10-15 Thread Glen Lipka
My IE7 was almost identical.
FF2 gave  219  293 (which meant that the non-tweaked version was faster)
Strange its all over the place.

Glen

On 10/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I got those results :
>
> FF 2.0.0.7
> final time (less is better)  941 653
>
> IE6 with SP2 and all updates
> final time (less is better)  1108   955
>
> So I guess the "modded" version increase between 20% up to 30% the
> speed of the selectors.
>
> Make your tries but thanks Glen for this try.
>
> ps: sorry for my English (french speaking guy)
>
> On Oct 15, 12:24 am, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:
> > Guy Fraser schrieb:> Glen Lipka wrote:
> > >>http://commadot.com/jquery/experiments/speedtest/#
> > >> I modified a version of jQuery to include that one line and it threw
> > >> a JS error.
> > >> Then I tried using the second way with the var doc = document and
> > >> renamed document everywhere to be doc.
> > >> No change at all in speed.
> >
> > > Having run that test a few times in FF 2.0.0.7 I noticed that the
> > > tweaked jQuery (which also had smaller file size) seemed to be
> faster...
> >
> > The difference in size isn't worth it if you gzip your JavaScript.
>
>


[jQuery] .clone(true) not working in IE

2007-10-15 Thread Eridius




What my code does is you click on the link and it re orders these divs, here
is the part of my code having trouble

new_div[x] = $('#hotel_information [EMAIL PROTECTED]:eq(' +
div_index + ')').clone(true);
then:
for(x = 0; x < div_length; x++)
{
$('#hotel_information').append(new_div[x]);
}

Does anything look wrong in there?  It works in FF(actually it works without
the clone method) but not fully work in IE 7 or 6.  Also the part that is
not work is the tabs(using the older version and not the UI version). 
another thing to mention is that the event do care over if i do not trigger
them.  say i have 2 div and i click on the tabs in the first one.  I then re
order when make the first div the last div and the last div the first div. 
now if i click on the first div tabs, they work because i did not click on
them before the reorder but the second tabs do not work because i click on
the before the reorder.  anyone know what mgiht be cause this from this
description(can't give a link right now).
-- 
View this message in context: 
http://www.nabble.com/.clone%28true%29-not-working-in-IE-tf4628650s27240.html#a13216375
Sent from the jQuery General Discussion mailing list archive at Nabble.com.



[jQuery] Re: Using multiple versions of jQuery on the same page

2007-10-15 Thread Jonathan Sharp
A URL would be helpful for debugging.

-js


On 10/15/07, airslim <[EMAIL PROTECTED]> wrote:
>
>
> Actually it does make sense... but its not working, for my case :
> var jq = jQuery.noConflict(true);
>
> throws an arror with firebug -> "jQuery is not a constructor".
>
>


[jQuery] Re: Using multiple versions of jQuery on the same page

2007-10-15 Thread airslim

Actually it does make sense... but its not working, for my case :
var jq = jQuery.noConflict(true);

throws an arror with firebug -> "jQuery is not a constructor".



[jQuery] draggable and droppable tabs

2007-10-15 Thread scottnath

I am trying to create draggable/droppable tabs. I've got it partly
built, but I'd love some community input on this.

A working model can be seen here:

http://scottnath.com/tabs/draggable_tabs.html

Below I will paste the jquery code I'm using. First, here are some
issues I'm running into that I really need some help with:

1) tabs can only be moved once
2) moving tabs from left-to-right works, but not vice/versa
3) I'm having trouble figuring out the dragged tabs original index



jQuery code:

$(document).ready(function(){
bindBehavior();
});
function bindBehavior(){
$("#left_left > ul").tabs();
$("#left_right > ul").tabs();
$(".draggableItem").Draggable({
revert: true
});
$(".tabsList").Droppable({
accept: "draggableItem",
ondrop: function (drag){
var thisId = $(this).attr("id");
// gets the id of the container that the draggable's 
tab content
should end up in
var thisParent = $(this).parent().attr("id");
// gets the moved tab id by using the href
var dragAHref = $(drag).children("a").attr("href");
// remove the leading # sign
var dragTabId = dragAHref.substring(1);
// gets the clickable-tab content
var dragAContent = $(drag).children("a").text();
// gets the id of the container that the draggable's 
tab content
resides in
var dragParent = $("#"+dragTabId).parent().attr("id");
// if it didn't move to a new spot, do nothing
if(dragParent == thisParent){
return;
}
// finds the htmlobject that is the dragged LI's 
corresponding tab
var dragTab = $("#"+dragTabId).get(0);
// gets tab LI index
var dragIndex = $("li.draggableItem").index(drag);
// next: put content of tab into newly created tab
var movedTabContent = $("#"+dragTabId).html();
// for some reason, the index seems to come out one too 
many
dragIndex--;
// remove the tab from where it came from
$("#"+dragParent+ " ul").tabsRemove(dragIndex);
// add this tab to where it was dragged
$("#"+thisId).tabsAdd('#'+dragTabId, dragAContent);
// need to add this class
$("#"+dragTabId).addClass('tabContent');
// populate the tab-div
$("#"+dragTabId).html(movedTabContent);

bindBehavior();
}
});
}



Thank you to anyone who can help. I really appreciate it.

Scott Nath



[jQuery] Re: Access "parent page" from ajax generated html

2007-10-15 Thread Mark

It did work! I will keep digging. Sorry for the premature post.


On Oct 14, 6:35 am, Mark <[EMAIL PROTECTED]> wrote:
> The example code there doesn't do everything it needs to test this
> out.
> I the part between the  and  needs to be
> retrieved by ajax
>
> I guess I could put that in and see if it worked with that code.
>
> I'll let you know the results... thx again Wizzud
>
> On Oct 14, 6:12 am, Wizzud <[EMAIL PROTECTED]> wrote:
>
> > Apart from the fact that it's a manual action, what doesn't work with
> > the example code?
>
> > On Oct 13, 3:23 pm, Mark <[EMAIL PROTECTED]> wrote:
>
> > > It seems this post was deleted... Why?
>
> > > If I have a main page and a section of it generated by Ajax, how do I
> > > access an element in the main page from the section generated by Ajax?
>
> > > Or, in code speak: (how can I make something like this work)
>
> > > 
> > >
>
> > >
> > >
>
> > >Remove
> > > Fredington
>
> > >
> > >
> > > 



[jQuery] Re: iframe bug document.defaultView.getComputedStyle(elem,null)

2007-10-15 Thread romalley

Skilip,

Thank you for this posting!  We ran into the exact problem and your
fix killed the bug in minutes.  I do hope it makes it into the
official jQuery.js release.

Bob

On Oct 11, 3:41 am, Skilip <[EMAIL PROTECTED]> wrote:
> Hi, I found a bug with jQuery version 1.2. It concerns the following
> error generated by Firebug in Firefox when a iframe is present in a
> page.
>
> document.defaultView.getComputedStyle(elem, null) has no properties
>
> I solved it by replacing the following code with the code pasted
> underneath.
>
> old: (line 729)
> ret = prop == "display" && 
> swap[stack.length-1] != null ?
> "none" :
>
> document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop)
> || "";
>
> new:
> ret = prop == "display" && 
> swap[stack.length-1] != null ?
> "none" :
> 
> (document.defaultView.getComputedStyle(elem,null)) ?
>
> document.defaultView.getComputedStyle(elem,null).getPropertyValue(prop) :
> "";
>
> Can I report this bug somewhere @ jQuery's website?



[jQuery] JQuery Expand/Collapse Troubleshooting

2007-10-15 Thread briantalbot


Hi All,

I'm having a bit of trouble implementing a show/hide bit of JQuery
JavaScript and was wondering if anyone had any ideas or advice that
may help.

On this page http://tinyurl.com/33wksr (my apologies for the missing
content and overall clunkiness of the page - its been copied out of
the NG CMS that doesn't support web standards just yet for
troubleshooting.), I have a JQuery script (found here -
http://tinyurl.com/354fk2)
that is controlling the visual display of elements within a .  This seems to be working as needed in Firefox
(PC and Mac) and Safari.

The issue I'm running into is that in Internet Explorer 6 and 7, the
JQuery script doesn't seem to run or affect the HTML within  as it should. At best, I've gotten the behavior to
happen sporadically where sometimes the script will work and then is
cached in the IE browser and other pages that use this same JQuery
script behave properly. Most of the time however, the HTML and page
are not altered by the JQuery code.

I know there are a ton of other JS calls on this page as well as a lot
of elements (non-semantic markup, tons of tables) in the DOM. Could
either of these be affecting how/when IE loads the DOM and the JQuery
instructions?

* Has anyone else run into this or something similar?
* Does anyone have any ideas about what may be causing the problem?
* My understanding was that JQuery attempted to make DOM and JS load
timing universal across browsers, are there any cases where this
wouldn't happen with IE?



On a separate note, due to sites like this being in a CMS, who's
templating engine we have little control over, we'd like to abstract
this out a bit more and call these two specific JavaScript files
(jquery.js and science.js) from one JavaScript file that we can add
to. I have an example of a page referencing that here -
http://tinyurl.com/2yfg69

This page is using the following JavaScript to add the needed 

[jQuery] Re: Using multiple versions of jQuery on the same page

2007-10-15 Thread George

I'll try to be a bit more clear.

There's a couple of simple rules. Whenever you include jQuery, it will
take anything already in the $ and jQuery variables and back them up
so it can install itself in the $ and jQuery variables. When you call
noConflict(true), jQuery (the version that is in the $ and jQuery
variables - i.e. the last version loaded) will take the backed up
library and put it back into the $ and jQuery variables, then return
you a pointer to itself.

If you're wanting to use two versions of jQuery as well as Prototype
on the same page, you'll need to call noConflict twice, and import
things in a certain order. I'm not sure how well this will work with
 blocks being loaded asynchronously (you'll need to
give it a good test) but it should work.