开发者

Fancybox won't load inline html - but works fine with text content

开发者 https://www.devze.com 2023-02-27 10:51 出处:网络
I have a problem with fancybox. It loads text content fine, but it won\'t load html content at all: <link rel=\"stylesheet\" type=\"text/css\" href=\"/scripts/fancybox/jquery.fancybox-1.3.4.css\"&

I have a problem with fancybox. It loads text content fine, but it won't load html content at all:

<link rel="stylesheet" type="text/css" href="/scripts/fancybox/jquery.fancybox-1.3.4.css">
<script type="text/javascript" src="/scripts/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="/scripts/fancybox/jquery.easing-1.3.pack.js"></script>
<script type="text/javascript" src="/scripts/fancybox/jquery.fancybox-1.3.4.js"></script>
<script typ开发者_运维知识库e="text/javascript">
    $(document).ready(function () {
        $("a.group").fancybox();
    });
</script>
<a class='group' href='#eventInfo1161a'>161</a>
<div style='display: none;'>
    <div id='eventInfo1161a' style='display: block;' class='textDark'>
        <div class='eventItem'>
            <h3 class='eventItemHeader'>
                Sjov event</h3>
            <div class='eventType'>
                Offentlig</div>
            <div class='eventStart'>
                Kl.:10:00</div>
            <div class='eventDuration'>
                1,5 timer</div>
        </div>
    </div>
</div>

If I enter some text content in the div with id 'eventInfo1161a' - it loads perfectly - what I'm I missing here?


Oh boy... It was such a stupid mistake on my behalf! Someplace in my styling I set .eventItem = display:none;

So look for overrides in Your CSS :-(

0

精彩评论

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

关注公众号