Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-26-2009, 08:25 PM   PM User | #1
surreal5335
Regular Coder

 
Join Date: May 2008
Posts: 446
Thanks: 23
Thanked 5 Times in 5 Posts
surreal5335 is an unknown quantity at this point
jcarousel lite plug in help needed

I am creating this carousel with jcarousel lite plug in but instead of
getting a carousel I am just getting a vertical static list of images
when loading it into a table cell with firefox. I have read that IE is
notroious for having this problem as well.
Upon pressing the next and prev buttons the list just hides and shows
itself.

I know that plug in is being called properly bc without the call for
the script, the toggling of the list with the buttons doesnt work.

I have gone over my code and several times and checked install notes
and other demo scripts, but still have same problem.

Here is my link to the page at issue

http://royalvillicus.com/photo_site/photo.html

I appreciate any help in solving this matter
surreal5335 is offline   Reply With Quote
Old 02-26-2009, 08:54 PM   PM User | #2
Eldarrion
Regular Coder

 
Join Date: Feb 2009
Location: Wheeling, IL
Posts: 358
Thanks: 5
Thanked 62 Times in 60 Posts
Eldarrion is on a distinguished road
Main reasoning for that is because your jCarousel initialization isn't located in the $(document).ready, but is instead floating freely.

Finalized, the code should look like:
Code:
 $(document).ready(function(){
 	$("a#site").click(function(){
 		$("div.gallery").slideDown("slow");
 		$("span.menu").fadeIn("slow");
 		$("span.picture").slideDown("slow");
 		$("a#site").fadeOut("slow");
   });
	$("#pictures").jCarouselLite({
      btnNext: ".nextpic",
      btnPrev: ".prevpic",
      visible: 5,
      speed: 400,
      vertical: true,
	});
	$("#gallery").jCarouselLite({
      btnNext: ".nextgal",
      btnPrev: ".prevgal",
      visible: 5,
      speed: 400,
	});
 });

As for stuff hiding, the main cause for that is the following code:

Code:
$(document.body).click(function () {
      if ($("div:first").is(":hidden")) {
        $("div").slideDown("slow");
      } else {
        $("div").hide();
      }
    });
Where you're essentially telling it... "whenever I click on any part of the window, hide or show the first div." Also, I'd suggest you look into the #pictures gallery, because it doesn't seem to contain pictures, but htm files instead. Also... do have a look at the solution to your other problem in this forum as well, because I see you haven't implemented it either:

http://www.codingforums.com/showthread.php?t=158332
Eldarrion is offline   Reply With Quote
Old 06-02-2009, 09:54 PM   PM User | #3
freshtc
New to the CF scene

 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
freshtc is an unknown quantity at this point
Solved

Last edited by freshtc; 06-03-2009 at 06:55 AM..
freshtc is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:17 AM.


Advertisement
Log in to turn off these ads.