Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
[JS] fancyBoX problem z umieszczeniem w PHP
#7
Jakoś udało mi się już zajść bardzo daleko... teraz mam pytanie dlaczego zmieniło mi scieżki do obrazów strony? Musiałem wrzucić folder images do fancybox, bo wszędzie dodało (samo) w css ten folder....
Kod:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta content="true" name="mssmarttagspreventparsing" />
    <meta http-equiv="imagetoolbar" content="no" />
    <title>Biblioteka ZSHT</title>
    <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
    <!-- IE fixes -->
    <!--[if lte IE 6]>
    <style type="text/css">
        #ccnt {_height:1200px;}
        .post {padding:0 0 25px;}
    </style>
    <![endif]-->
    <!-- Add jQuery library -->
    <script type="text/javascript" src="fancybox/lib/jquery-1.9.0.min.js"></script>

    <!-- Add mousewheel plugin (this is optional) -->
    <script type="text/javascript" src="fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>

    <!-- Add fancyBox main JS and CSS files -->
    <script type="text/javascript" src="fancybox/source/jquery.fancybox.js?v=2.1.4"></script>
    <link rel="stylesheet" type="text/css" href="fancybox/source/jquery.fancybox.css?v=2.1.4" media="screen" />

    <!-- Add Button helper (this is optional) -->
    <link rel="stylesheet" type="text/css" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" />
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>

    <!-- Add Thumbnail helper (this is optional) -->
    <link rel="stylesheet" type="text/css" href="fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" />
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>

    <!-- Add Media helper (this is optional) -->
    <script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.5"></script>

<script type="text/javascript">
        $(document).ready(function() {
            /*
             *  Simple image gallery. Uses default settings
             */

            $('.fancybox').fancybox();

            /*
             *  Different effects
             */

            // Change title type, overlay closing speed
            $(".fancybox-effects-a").fancybox({
                helpers: {
                    title : {
                        type : 'outside'
                    },
                    overlay : {
                        speedOut : 0
                    }
                }
            });

            // Disable opening and closing animations, change title type
            $(".fancybox-effects-b").fancybox({
                openEffect  : 'none',
                closeEffect    : 'none',

                helpers : {
                    title : {
                        type : 'over'
                    }
                }
            });

            // Set custom style, close if clicked, change title type and overlay color
            $(".fancybox-effects-c").fancybox({
                wrapCSS    : 'fancybox-custom',
                closeClick : true,

                openEffect : 'none',

                helpers : {
                    title : {
                        type : 'inside'
                    },
                    overlay : {
                        css : {
                            'background' : 'rgba(238,238,238,0.85)'
                        }
                    }
                }
            });

            // Remove padding, set opening and closing animations, close if clicked and disable overlay
            $(".fancybox-effects-d").fancybox({
                padding: 0,

                openEffect : 'elastic',
                openSpeed  : 150,

                closeEffect : 'elastic',
                closeSpeed  : 150,

                closeClick : true,

                helpers : {
                    overlay : null
                }
            });

            /*
             *  Button helper. Disable animations, hide close button, change title type and content
             */

            $('.fancybox-buttons').fancybox({
                openEffect  : 'none',
                closeEffect : 'none',

                prevEffect : 'none',
                nextEffect : 'none',

                closeBtn  : false,

                helpers : {
                    title : {
                        type : 'inside'
                    },
                    buttons    : {}
                },

                afterLoad : function() {
                    this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
                }
            });


            /*
             *  Thumbnail helper. Disable animations, hide close button, arrows and slide to next gallery item if clicked
             */

            $('.fancybox-thumbs').fancybox({
                prevEffect : 'none',
                nextEffect : 'none',

                closeBtn  : true,
                arrows    : true,
                nextClick : true,

                helpers : {
                    thumbs : {
                        width  : 50,
                        height : 50
                    }
                }
            });

            /*
             *  Media helper. Group items, disable animations, hide arrows, enable media and button helpers.
            */
            $('.fancybox-media')
                .attr('rel', 'media-gallery')
                .fancybox({
                    openEffect : 'none',
                    closeEffect : 'none',
                    prevEffect : 'none',
                    nextEffect : 'none',

                    arrows : false,
                    helpers : {
                        media : {},
                        buttons : {}
                    }
                });

            /*
             *  Open manually
             */

            $("#fancybox-manual-a").click(function() {
                $.fancybox.open('1_b.jpg');
            });

            $("#fancybox-manual-b").click(function() {
                $.fancybox.open({
                    href : 'iframe.html',
                    type : 'iframe',
                    padding : 5
                });
            });

            $("#fancybox-manual-c").click(function() {
                $.fancybox.open([
                    {
                        href : '1_b.jpg',
                        title : 'My title'
                    }, {
                        href : '2_b.jpg',
                        title : '2nd title'
                    }, {
                        href : '3_b.jpg'
                    }
                ], {
                    helpers : {
                        thumbs : {
                            width: 75,
                            height: 50
                        }
                    }
                });
            });


        });
    </script>
</head>

<body>

<!-- Header -->
<div id="hdr">

    <!-- Search form -->
    
    <!-- Logo -->
    <div id="logo">
                <a href="#"></a>
    </div>
    
    <!-- Main Menu -->
    <div id="menu">
        <a class="menu_grap" href="index.php">Home</a>
        <a class="menu_freeb" href="books.php">Księgozbiór</a>
        <a class="menu_frm" href="#">Konkursy</a>
        <a class="menu_fnt" href="#">Wystawy</a>
    </div>
</div>

<!-- Main Container -->
<div id="cnt">
    
    <!-- Left Column -->
    <div id="lcnt">
        <!-- Left Column Section Links -->
                <div class="lslink">
                        <a class="tutorial" href="regulamin.php">Regulaminy</a>
                        <a class="showcases" href="catalogs.php">Katalogi</a>
                        <a class="inspiration" href="#">Rozmaitości</a>
                        <a class="brushes" href="contact.php">Kontakt</a>
                        <a class="photoshop" href="news/index.php">Zaloguj</a>
                </div>

        
        <!-- Friends -->
        <h3 class="sidetit_l">Linki</h3>
        <a class="friends" href="http://zsht.pl">ZSHT</a>
    </div>

    <!-- Main - Center Column -->
    <div id="ccnt">

        <!-- Post -->
        <div class="post">
            <!-- Post Title - Permalink -->
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="fancybox/demo/4_b.jpg"><img src="fancybox/demo/4_s.jpg" alt="" /></a>
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="fancybox/demo/5_b.jpg"><img src="fancybox/demo/5_s.jpg" alt="" /></a>
<a class="fancybox" href="fancybox/demo/1_b.jpg"><img src="fancybox/demo/1_s.jpg" alt=""/></a>
<a class="fancybox" href="fancybox/demo/2_b.jpg"><img src="fancybox/demo/2_s.jpg" alt=""/></a>
        </div>
        
        <!-- Pagination -->
        <!-- Center Column bottom Borders -->
        <div id="dummy"></div>
    </div>

    <!-- Right Column -->
    <div id="rcnt">
        <!-- Additional Sections Links -->
        <h3 class="bib"><center>Biblioteka Czynna:</center></h3>
<img src="images/godziny.png" alt="Godziny otwarcia" />


        <!-- Calendar -->
        <p style="line-height: 1cm; ">&nbsp</p>
    <script type="text/javascript" src="http://404bajery.pl/kalendarz/kal.php?tlo=FFFFFF&czcionka=333333&nag=FF9900&dni=FFFFFF&dzis=FF8C00&szer=160"></script>

        
    </div>
    <br style="clear:both;"/>
</div>

<!-- Footer -->
<div id="foo">
    <div id="foot_menu">
        <div id="f_menu">
            <a class="f_grap" href="index.php">Home</a>
            <a class="f_freeb" href="books.php">Księgozbiór</a>
            <a class="f_frm" href="#">Konkursy</a>
            <a class="f_fnt" href="#">Wystawy</a>
        </div>
        <span class="f_left">&copy; 2013 ZSHT. All rights reserved.</span>

        <a class="f_rght" href="" title="Silentkiller">Code&Design SilentKiller & Frixu</a>
    </div>
</div>
</body>
</html>
Odpowiedz


Wiadomości w tym wątku
RE: [JS] fancyBoX problem z umieszczeniem w PHP - przez SilentKiller - 13-06-2013, 00:41

Podobne wątki…
Wątek: Autor Odpowiedzi: Wyświetleń: Ostatni post
  [CSS]Rozstawienie okna Fancybox Stef@n 1 1,906 30-01-2011, 04:41
Ostatni post: trak

Skocz do:


Użytkownicy przeglądający ten wątek: 1 gości
Sponsorzy i przyjaciele
SeoHost.pl