JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 9th, 2012, 02:10 PM
josephman1988's Avatar
josephman1988 josephman1988 is offline
*Programmer In Training*
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Location: SE London
Posts: 369 josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Week 10 h 26 m 31 sec
Reputation Power: 11
Send a message via MSN to josephman1988
Facebook
jQuery - $(this).animate not working

http://jsfiddle.net/SubrS/2/

I have no idea why this isn't working, surely it cannot be because of the inline styling,its only there until I get the animation works then I'll put it into a stylesheet!

Hope someone can help, I have this working on loads of other sites!

Thanks in advance.

Regards,
Joe.

Reply With Quote
  #2  
Old October 9th, 2012, 03:11 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,830 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 17 h 1 m 7 sec
Reputation Power: 4192
It's working fine actually. It's just not working how you expect. You see when you increase the padding on one link, it increases the width of the parent and it's parent, etc. on up to the fixed positioned element. The other links also grow to the new width of their ancestors.

Why do you have a <div> as a parent of each link? I suggest you remove them and move the background color from the <li>s to the <a>s.
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Reply With Quote
  #3  
Old October 9th, 2012, 03:43 PM
josephman1988's Avatar
josephman1988 josephman1988 is offline
*Programmer In Training*
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Location: SE London
Posts: 369 josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Week 10 h 26 m 31 sec
Reputation Power: 11
Send a message via MSN to josephman1988
Facebook
Ah ok, I see how it's working now, so it's the position:fixed; that could be causing this issue? The reason I ask is because I've used this same technique on other websites, and they've worked as intended.

http://jsfiddle.net/SubrS/19/

The above code is how you explained, but the same problem exists?

Thanks for your help of understanding the problem mate!

Reply With Quote
  #4  
Old October 9th, 2012, 04:30 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,830 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 17 h 1 m 7 sec
Reputation Power: 4192
You're welcome.

Quote:
so it's the position:fixed; that could be causing this issue?

Not quite. It's the shrink-wrapping nature of the fixed positioning that's causing it.

Quote:
The above code is how you explained, but the same problem exists?

The background color is still on the <li>s. However, you'll need to make another change as well. I suggest you give the <a>s a right margin and then decrease it when you increase the padding.

Reply With Quote
  #5  
Old October 9th, 2012, 05:32 PM
josephman1988's Avatar
josephman1988 josephman1988 is offline
*Programmer In Training*
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Location: SE London
Posts: 369 josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level)josephman1988 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Week 10 h 26 m 31 sec
Reputation Power: 11
Send a message via MSN to josephman1988
Facebook
I see - wow, I've done a million sites and not once have I come across this issue before! Shows that no matter how many years you've developed websites, you can always be surprised by something so .. simple in the end!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > jQuery - $(this).animate not working

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap