[jQuery] Re: jCarousel infinite loop problem w/ multiple carousels on display: none

2008-04-18 Thread Jan Sorgalla

Hi,

On 17 Apr., 21:00, jack [EMAIL PROTECTED] wrote:

 Could anyone tell me the purpose of binding the window resize to
 reload the carousel? Why would this need to happen by default, it
 seems unnecessary...?

thats because you can control the behaviour of the width from outside
with css.
On resize, the number of visible items can change and jcarousel needs
to know that for firing the callbacks.

See: http://sorgalla.com/projects/jcarousel/examples/static_callbacks.html

But i'll keep that in mind and will add an noOnResizeBind option to
the next version.

Jan


[jQuery] Re: jCarousel infinite loop problem w/ multiple carousels on display: none

2008-04-17 Thread jack

I was having a problem across all browsers, with both vertical and
horizontal carousels, where upon resizing the browser window, no more
new items would be visible in the carousel, something like a
miscalculation of height or width following the resize/reload.
Whatever the specific cause, the end result was the item that should
have been visible to be hidden.

Could anyone tell me the purpose of binding the window resize to
reload the carousel? Why would this need to happen by default, it
seems unnecessary...?

Love this plugin by the way!



On Feb 26, 9:32 am, descott [EMAIL PROTECTED] wrote:
 Hey,

 I'm experiencing the same thing using IE7. This error doesn't occur on
 FireFox, but it does on IE.

 --Dan

 On Jan 30, 11:04 pm, Todd [EMAIL PROTECTED] wrote:

  I am attempting to build a page with multiple carousels, that by
  default, only one displays.  When you click on an element on the page
  (a staff members name), you see their own personal carousel, which
  replaces the default.

  When I attempt to do this, I receive the following error message:

  jCarousel: No width/height set for items. This will cause an infinite
  loop. Aborting

  Code:

  var $j = jQuery.noConflict();

  $j(document).ready(function() {

  onLoad();

  $j('ul.usecarousel').jcarousel({
  visible: 5
  });

  $j('.gpic_wrapper').hide();
  $j('.gpic_wrapper#jamie').show();

  $j('a.teamnav').click(function()
  {
  $j('.gpic_wrapper').hide();
  $j('.gpic_wrapper#' + this.id).show();

  var currentPerson = this.id;

  $j(a.teamnav).each(function()
  {
  if (this.id == currentPerson)
  $j(this).addClass(selectedPerson);
  else
  $j(this).removeClass(selectedPerson);
  });
  return false;
  });
  });

  I am linking to the appropriatejcarouseland skin.css, but if I take
  a div class that surrounds one of the carousels and display: none; it,
  and thenresizemy browser window, the alert error appears.

  I have also adjusted myjcarouselpack and swapped

  |loop|ol|infinite|an|ul|cause|will|This|items|set|No|jCarousel|alert|

  with

  |loop|ol|infinite|an|ul|cause|will|This|items|set|No|jCarousel|isNaN|

  but still am having no luck.

  I don't have a way to publish the page currently as it also involves a
  google map, and the api key is set to my dev area only.

  Thoughts?


[jQuery] Re: jCarousel infinite loop problem w/ multiple carousels on display: none

2008-02-04 Thread Josh V

todd, how are you building two carousels on the same page? are you
using the same css file to build them? how can i build two carousels
with while referencing their own stylesheets.

On Jan 31, 4:17 pm, Todd [EMAIL PROTECTED] wrote:
 I actually was able to figure out what the issue was.

 Since this error was happening on resize, I commented out

 $(window).bind('resize', function() { self.reload(); });

 and for good measure, also commented out

 alert('jCarousel: No width/height set for items. This will cause an
 infinite loop. Aborting...');

 That seemed to do the trick.  Now I can swap out carousels using show/
 hide with an onclick and when I resize the browser window, no alert.

 Once the page is up, I will post a link so others may benefit from how
 it was built and use it for their own platforms.

 - Todd


[jQuery] Re: jCarousel infinite loop problem w/ multiple carousels on display: none

2008-01-31 Thread Jan Sorgalla

Hi,

i couldn't reproduce that. Can you please create a cleaned up sample
page (without google maps) where i can test it.

Jan

On 31 Jan., 04:04, Todd [EMAIL PROTECTED] wrote:
 I am attempting to build a page with multiple carousels, that by
 default, only one displays.  When you click on an element on the page
 (a staff members name), you see their own personal carousel, which
 replaces the default.

 When I attempt to do this, I receive the following error message:

 jCarousel: No width/height set for items. This will cause an infinite
 loop. Aborting

 Code:

 var $j = jQuery.noConflict();

 $j(document).ready(function() {

 onLoad();

 $j('ul.usecarousel').jcarousel({
 visible: 5
 });

 $j('.gpic_wrapper').hide();
 $j('.gpic_wrapper#jamie').show();

 $j('a.teamnav').click(function()
 {
 $j('.gpic_wrapper').hide();
 $j('.gpic_wrapper#' + this.id).show();

 var currentPerson = this.id;

 $j(a.teamnav).each(function()
 {
 if (this.id == currentPerson)
 $j(this).addClass(selectedPerson);
 else
 $j(this).removeClass(selectedPerson);
 });
 return false;
 });
 });

 I am linking to the appropriate jcarousel and skin.css, but if I take
 a div class that surrounds one of the carousels and display: none; it,
 and then resize my browser window, the alert error appears.

 I have also adjusted my jcarousel pack and swapped

 |loop|ol|infinite|an|ul|cause|will|This|items|set|No|jCarousel|alert|

 with

 |loop|ol|infinite|an|ul|cause|will|This|items|set|No|jCarousel|isNaN|

 but still am having no luck.

 I don't have a way to publish the page currently as it also involves a
 google map, and the api key is set to my dev area only.

 Thoughts?


[jQuery] Re: jCarousel infinite loop problem w/ multiple carousels on display: none

2008-01-31 Thread Todd

I actually was able to figure out what the issue was.

Since this error was happening on resize, I commented out

$(window).bind('resize', function() { self.reload(); });

and for good measure, also commented out

alert('jCarousel: No width/height set for items. This will cause an
infinite loop. Aborting...');

That seemed to do the trick.  Now I can swap out carousels using show/
hide with an onclick and when I resize the browser window, no alert.

Once the page is up, I will post a link so others may benefit from how
it was built and use it for their own platforms.

- Todd