开发者

Scrolling Colorbox in IE

开发者 https://www.devze.com 2023-03-10 03:18 出处:网络
I\'m using ColorBox\'sAjax mode. <a class=\'data-content\' href=\'data/<?=$id?>\'> <img src=uploads/thumb_<?=$img?> /> <开发者_如何转开发/a>

I'm using ColorBox's Ajax mode.

<a class='data-content' href='data/<?=$id?>'> <img src=uploads/thumb_<?=$img?> /> <开发者_如何转开发/a>

     <script type="text/javascript"> 

      $(document).ready(function(){

        $(".data-content").colorbox({
              transition: "none",
              title: false,
              width: "700px",
              top: "10px",
              loop: false,
              scrolling: false
        });

      });

     </script>

After clicking on photo thumb it loads colorbox with photo and other content. Usually it's height is larger than screen. So scrollbars appear. With other browsers (Mozilla, Chrome) I can scroll up and down and see all content in box with no problems.

When scrolling with IE8 colorbox stays in the same place and instead that background scrolls. So I can't see all content.

Here is an example. Actually it's the default Colorbox example.

Any ideas on what may be causing the problem?


It could be this... from the site - http://colorpowered.com/colorbox/#doctype

ColorBox requires a valid doctype and rendering in quirks mode is not supported. If you aren't using the HTML5 doctype, make sure you are using the full doctype declaration (with URI) to insure rendering in standards mode.

Unfortunately, this abbreviated doctype renders the document in quirks mode for Internet Explorer:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

The doctype with URI renders in standards mode for all browsers:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">


Problem is solved with new colorbox update:

Thank you @Jack.


I don't see how that is possible unless you have some CSS that is setting colorbox's position to 'fixed'. I suggest posting a link that demonstrates the problem. Your code snippet looks fine, and using your same settings cause no issues for me when using colorbox for ajax content.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号