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 08-04-2009, 12:44 PM   PM User | #1
lauthiamkok
Regular Coder

 
Join Date: Dec 2008
Posts: 117
Thanks: 14
Thanked 0 Times in 0 Posts
lauthiamkok is an unknown quantity at this point
jquery: a bug in safari and chrome - css({overflow:'auto'})

Hi,
I set the body tag to overflow:hidden when the page is ready.
$('body').css({overflow:'hidden'});

and i try to set the overflow to 'auto' when the 'show more' is clicked.
$('body').css({overflow:'auto'});

it works fine in firefox and IE 8. but it wont work on safari and chrome - show the scroll bar when the show more' is clicked.

it only works in safari and chrome if I set it to,
$('body').css({overflowY:'scroll'});

but i only want to show the scroll when there are content is overflowed only.

how can i fix this browser bugs?

here are the links to look at,
http://lauthiamkok.net/tmp/projects/part/
view-source:http://lauthiamkok.net/tmp/projects/part/js/core.js

many thanks,
Lau
lauthiamkok is offline   Reply With Quote
Old 08-05-2009, 04:22 AM   PM User | #2
Iszak
Regular Coder

 
Iszak's Avatar
 
Join Date: Jun 2007
Location: Perth, Western Australia
Posts: 332
Thanks: 2
Thanked 58 Times in 57 Posts
Iszak is an unknown quantity at this point
I do not have the problem you specify, when there is overflow: auto; set to the body but does not overflow Google Chrome does not show the scroll bar, only until there is overflow does it show.

Although I do notice that when you set overflow: hidden; in Google Chrome it set two properties (overflow-x and overflow-y) as opposed to simply overflow which may be jQuery or simply how it manipulates overflow. As seen here (www.grabup.com/uploads/c20a340123fe.png)

I should also mention this really isn't a bug.
Iszak 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 09:50 PM.


Advertisement
Log in to turn off these ads.