Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 757 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Javascript :

Jquery animate (help needed)

Thread title: Jquery animate (help needed)
Closed Thread    
    Thread tools Search this thread Display Modes  
07-09-2008, 11:37 AM
#1
G-Sun is offline G-Sun
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
 
Posts: 101
iTrader: 0 / 0%
 

G-Sun is on a distinguished road

  Old  Jquery animate (help needed)

Hi!
I'm rather new to js and jQuery.
I'm making a fancy animated menu, but have some trubbel.

My code is:
Code:
	$(document).ready(function(){
	$('#K_meny').hover(function() {
	$('.anm').addClass('anm_start')
			.animate
			({
			clip: "rect(auto,auto,auto,auto)"
			left: "59px"
			}, 1000); 
 		});
	});
..it's the animate part that doesn't work. Errors? Suggestions?
(If I comment out the animate-part, it works..)

Thanks!

07-09-2008, 01:58 PM
#2
G-Sun is offline G-Sun
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
 
Posts: 101
iTrader: 0 / 0%
 

G-Sun is on a distinguished road

  Old

I've altered something, and written a bit further, but it's still not working..

Code:
	$(document).ready(function(){
	$('#K_meny').hover(function() {
		$('#anm').show()
				.attr({
					clip:"rect(auto,auto,auto,80px)"})
				.animate ({
					clip: "rect(auto,auto,auto,auto)"
					left: "59px"
					}, 1000);
		$('#K-meny li').show(100);
		$('#anm').hide();

		$('#K-meny .one').animate({
			top: "-26px"
			left: "48px"
			, { queue:false, duration:3000 }
			})
		$('#K-meny .two').animate({
			top: "-26px"
			left: "48px"
			, 1000
			})
		$('#K-meny .three').animate({
			top: "-26px"
			left: "48px"
			, 1000
			})
 	
 		});
	});
The three first lines are ok, after that I don't know what goes wrong..

07-18-2008, 10:48 AM
#3
G-Sun is offline G-Sun
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
 
Posts: 101
iTrader: 0 / 0%
 

G-Sun is on a distinguished road

  Old

Ok, no answers. I'll try the jQuary mail-list..

07-18-2008, 05:28 PM
#4
CreativeLogic is offline CreativeLogic
CreativeLogic's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 1,078
iTrader: 6 / 100%
 

CreativeLogic is on a distinguished road

Send a message via MSN to CreativeLogic

  Old

Try using Firefox's error console. Does it return an error? It looks like to me that you have a missing comma in there. Also .animate needs something else. It should probably be $.animate.

07-19-2008, 08:45 AM
#5
G-Sun is offline G-Sun
Status: Member
Join date: Feb 2008
Location: Norway
Expertise:
Software:
 
Posts: 101
iTrader: 0 / 0%
 

G-Sun is on a distinguished road

  Old

Thanks!
Originally Posted by CreativeLogic View Post
Try using Firefox's error console.
Do you mean Firebug? I've updated to F3 and I can't find the error icon..

I've got help on the mail-list. .animate doesn't support clip, and there are some other errors. (clip doesn't go with .attr and theres some queuing-issues).

Thanks!

07-19-2008, 08:42 PM
#6
CreativeLogic is offline CreativeLogic
CreativeLogic's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 1,078
iTrader: 6 / 100%
 

CreativeLogic is on a distinguished road

Send a message via MSN to CreativeLogic

  Old

Install the web developer toolbar (i think it's called). You'll see the options for the error console to the far right.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed