Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JQuery scrollbar issue with IE

Posted on 2012-03-13
2
Medium Priority
?
426 Views
Last Modified: 2012-03-15
Hi Experts

I am trying to use JQuery to load an html page into a <div> when a button is clicked. This all worked fine with Chrome/Safari, but in IE I noticed that when the inserted html page was smaller than the <div> size, the scrollbars did not appear like they did in Safari/Chrome.

i finally figured this out, i had the style property display:none set on the <div>. When I removed this setting the scrollbars worked in all browsers, with no other side effects.

The problem I have now is that when I fire another JQuery function to hide the <div> using either hide() or slideUp(), the <div> does hide, but JQuery has now applied a style property using display:none, which means if I then re-open the <div> the scrollbars have disappeared.

As I said before this is just IE (I am using v9), does anyone know how to prevent this from  happening?

I have also tried removing the 'style' attribute from the <div> using removeAttr(), then recreating the same attributes as before using attr(), but the scrollbars are still missing.

I'm pulling my hair out, please can somebody help me?

Thanks in advance.
0
Comment
Question by:w1res
2 Comments
 
LVL 19

Accepted Solution

by:
Albert Van Halen earned 1000 total points
ID: 37722225
What is your statement to show the div ? Can you show some code

jQuerys' hide method sets the style property display to none.
The show method will remove the style property display or in later versions sets it back to what is was before hiding it.
0
 

Author Closing Comment

by:w1res
ID: 37727296
Thank you, this pointed me in the right direction. As you said, it seems that different hide/reveal functions use different methods. It turns out that if I use fadeIn and fadeOut instead of slideIn and slideOut the display attribute is not affected. Problem solved.
Thanks again.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question