rechtstexte für onlineshop
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: jQuery Thumbnail Hover in "main_content.html" einbinden

    deadlyclaws

    • Neu im Forum
    • Beiträge: 2
    Hallo zusammen,

    ich möchte gerne in einem Shop folgendes jQuery Plugin einbinden:
    http://buildinternet.com/project/mosaic/

    Ich glaube, ich habe soweit alles richtig gemacht. Ich bekomme nur folgendes Code Schnipsel nicht an’s laufen.

    Code: Javascript  [Auswählen]
    <script type="text/javascript">  
                           
                            jQuery(function($){
                                   
                                    $('.circle').mosaic({
                                            opacity         :       0.8                     //Opacity for overlay (0-1)
                                    });
                                   
                                    $('.fade').mosaic();
                                   
                                    $('.bar').mosaic({
                                            animation       :       'slide'         //fade or slide
                                    });
                                   
                                    $('.bar2').mosaic({
                                            animation       :       'slide'         //fade or slide
                                    });
                                   
                                    $('.bar3').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            anchor_y        :       'top'           //Vertical anchor position
                                    });
                                   
                                    $('.cover').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            hover_x         :       '400px'         //Horizontal position on hover
                                    });
                                   
                                    $('.cover2').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            anchor_y        :       'top',          //Vertical anchor position
                                            hover_y         :       '80px'          //Vertical position on hover
                                    });
                                   
                                    $('.cover3').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            hover_x         :       '400px',        //Horizontal position on hover
                                            hover_y         :       '300px'         //Vertical position on hover
                                    });
                       
                        });
                       
                    </script>

    Der Plugin-Ersteller hat diesen Code einfach im Head Bereich eingebaut. Bei mir funktioniert dies jedoch nicht. Auch wenn ich aus diesem Code eine extra JS-Datei erstelle und diese in der "general.js.php" abrufe funzt es nicht.
    Ich möchte das Plugin gerne auf der Startseite des Shops einbinden – also in der "main_content.html".

    Kann mir jemand helfen?
    Braucht ihr noch Infos?

    Linkback: https://www.modified-shop.org/forum/index.php?topic=18876.0

    hedon02

    • Viel Schreiber
    • Beiträge: 618
    Re: jQuery Thumbnail Hover in "main_content.html" einbinden
    Antwort #1 am: 13. März 2012, 22:08:16
    Haeng mal bitte noch den "html" Code an.

    Gruss

    deadlyclaws

    • Neu im Forum
    • Beiträge: 2
    Re: jQuery Thumbnail Hover in "main_content.html" einbinden
    Antwort #2 am: 14. März 2012, 09:52:31
    Hi,

    das ist meine "main_content.html":

    Code: XML  [Auswählen]
    {config_load file="$language/lang_$language.conf" section="index"}
    {$MODULE_error}
    <!--<h1>{$title}</h1>
    <div>{$text}</div>-->
    {if $MODULE_new_products}
    <div>{$MODULE_new_products}</div>
    {/if}
    {if $MODULE_upcoming_products}
    <div>{$MODULE_upcoming_products}</div>
    {/if}
    <div id="screen">
    <div class="mosaic-block fade">
    <a href="#" target="_blank" class="mosaic-overlay">
                                    <div class="details">
                                            <h4>bla</h4>
                                            <p>jojojo</p>
                                    </div>
                            </a>
    <div class="mosaic-backdrop"><img src="{$tpl_path}images/bild.jpg" alt="Bild" /></div>
    </div>
    <div class="con50l">
    <div class="smallpic">
    <img src="{$tpl_path}images/bild.jpg" alt="Bild" />
    </div>
    <div class="smallpic">
    <img src="{$tpl_path}images/bild.jpg" alt="Bild" />
    </div>
    </div>
    <div class="con50r">
    <img src="{$tpl_path}images/bild.jpg" alt="Bild" />
    </div>
    </div>
     

    Das die Einträge in der "general.js.php":

    Code: PHP  [Auswählen]
    <?php
    /* -----------------------------------------------------------------------------------------
       $Id: general.js.php 1262 2005-09-30 10:00:32Z mz $

       XT-Commerce - community made shopping
       http://www.(( Wir dulden keine kommerziellen Werbelinks - Bitte <a href="index.php?topic=3013.0">Forenregeln</a> beachten! ))

       Copyright (c) 2003 XT-Commerce
       -----------------------------------------------------------------------------------------
       Released under the GNU General Public License
       ---------------------------------------------------------------------------------------*/



       // this javascriptfile get includes at the BOTTOM of every template page in shop
       // you can add your template specific js scripts here
    ?>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.1.5.0.js" type="text/javascript"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/mosaic.1.0.1.js" type="text/javascript"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery.js" type="text/javascript"></script>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/thickbox.js" type="text/javascript"></script>



    <?php// BOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info ?>
    <?php
    if (strstr($PHP_SELF, FILENAME_PRODUCT_INFO )) {
    ?>
    <script src="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/javascript/jquery-ui.js" type="text/javascript"></script>
    <script type="text/javascript">
            $(function() {
                    $("#tabbed_product_info").tabs();
                    $("#accordion_product_info").accordion({ autoHeight: false });
            });    
    </script>
    <noscript>
            <link rel="stylesheet" href="<?php echo 'templates/'.CURRENT_TEMPLATE; ?>/css/no_javascript.css" type="text/css" media="screen" />
    </noscript>
    <?php
    }
    ?>
    <?php// EOF - web28 - 2010-07-09 - TABS/ACCORDION in product_info ?>
     

    Und das ist der Code von www.buildinternet.com:

    Code: XML  [Auswählen]
    <!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" xml:lang="en" lang="en">

            <!--
                    Mosaic - Sliding Boxes and Captions jQuery Plugin
                    Version 1.0.1
                    www.buildinternet.com/project/mosaic
                   
                    By Sam Dunn / One Mighty Roar (www.onemightyroar.com)
                    Released under MIT License / GPL License
            -->

            <head>

                    <title>Mosaic - Sliding Boxes and Captions jQuery Plugin</title>
                    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
                    <meta http-equiv="X-UA-Compatible" content="IE=8" />
                   
                    <link rel="stylesheet" href="css/mosaic.css" type="text/css" media="screen" />
                   
                    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
                    <script type="text/javascript" src="js/mosaic.1.0.1.js"></script>
                   
                    <script type="text/javascript">  
                           
                            jQuery(function($){
                                   
                                    $('.circle').mosaic({
                                            opacity         :       0.8                     //Opacity for overlay (0-1)
                                    });
                                   
                                    $('.fade').mosaic();
                                   
                                    $('.bar').mosaic({
                                            animation       :       'slide'         //fade or slide
                                    });
                                   
                                    $('.bar2').mosaic({
                                            animation       :       'slide'         //fade or slide
                                    });
                                   
                                    $('.bar3').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            anchor_y        :       'top'           //Vertical anchor position
                                    });
                                   
                                    $('.cover').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            hover_x         :       '400px'         //Horizontal position on hover
                                    });
                                   
                                    $('.cover2').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            anchor_y        :       'top',          //Vertical anchor position
                                            hover_y         :       '80px'          //Vertical position on hover
                                    });
                                   
                                    $('.cover3').mosaic({
                                            animation       :       'slide',        //fade or slide
                                            hover_x         :       '400px',        //Horizontal position on hover
                                            hover_y         :       '300px'         //Vertical position on hover
                                    });
                       
                        });
                       
                    </script>
                   
                    <style type="text/css">
                   
                            /*Demo Styles*/
                            body{ background:#e9e8e4 url('img/bg-grid.png');; }
                                    #content{ width:845px; margin:20px auto; padding:10px 30px; }
                                    .clearfix{ display: block; height: 0; clear: both; visibility: hidden; }
                                                   
                                    .details{ margin:15px 20px; }  
                                            h4{ font:300 16px 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height:160%; letter-spacing:0.15em; color:#fff; text-shadow:1px 1px 0 rgb(0,0,0); }
                                            p{ font:300 12px 'Lucida Grande', Tahoma, Verdana, sans-serif; color:#aaa; text-shadow:1px 1px 0 rgb(0,0,0);}
                                            a{ text-decoration:none; }
                   
                    </style>
                   
            </head>

    <body>

            <div id="content">
                   
                    <!--Circle-->  
                    <div class="mosaic-block circle">
                            <a href="http://buildinternet.com/project/mosaic" class="mosaic-overlay">&nbsp;</a>
                            <div class="mosaic-backdrop"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/mosaic.jpg"/></div>
                    </div>
           
                    <!--Fade-->
                    <div class="mosaic-block fade">
                            <a href="http://buildinternet.com/project/mightyicons/" target="_blank" class="mosaic-overlay">
                                    <div class="details">
                                            <h4>Mighty Social Icons</h4>
                                            <p>By Build Internet</p>
                                    </div>
                            </a>
                            <div class="mosaic-backdrop"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/mightyicons.jpg"/></div>
                    </div>
                   
                    <!--Bar-->
                    <div class="mosaic-block bar">
                            <a href="http://www.nonsensesociety.com/2011/01/sloppy-art/" target="_blank" class="mosaic-overlay">
                                    <div class="details">
                                            <h4>Sloppy Art - A Mess of Inspiration</h4>
                                            <p>via the Nonsense Society (image credit: Florian</p>
                                    </div>
                            </a>
                            <div class="mosaic-backdrop"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/florian.jpg"/></div>
                    </div>
                   
                    <!--Bar 2-->
                    <div class="mosaic-block bar2">
                            <a href="http://www.nonsensesociety.com/2010/12/i-am-not-human-portraits/" target="_blank" class="mosaic-overlay">
                                    <div class="details">
                                            <h4>I Am Not Human - Unique Self Portraits</h4><br/>
                                            <p>via the Nonsense Society (photo credit: Dan Deroches)</p>
                                    </div>
                            </a>
                            <div class="mosaic-backdrop"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/desroches.jpg"/></div>
                    </div>
                   
                    <!--Bar 3-->
                    <div class="mosaic-block bar3">
                            <a href="http://www.desktopped.com/featured/2010/09/multi-display-setup-with-four-systems-and-a-whole-lot-of-screen-space/" target="_blank" class="mosaic-overlay">
                                    <div class="details">
                                            <h4>Multi-Display Setup With Four Systems, A Wall of Screens, And 64TB Of Storage</h4>
                                            <p>via Desktopped</p>
                                    </div>
                            </a>
                            <a href="http://www.nonsensesociety.com/2010/12/i-am-not-human-portraits/" target="_blank" class="mosaic-backdrop"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/64tb.jpg"/></a>
                    </div>
                   
                    <!--Cover-->
                    <div class="mosaic-block cover">
                            <div class="mosaic-overlay"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/imac.jpg"/></div>
                            <a href="http://www.desktopped.com/featured/2010/12/mounted-imac-and-desk-mod-with-computer-components-built-in/" target="_blank" class="mosaic-backdrop">
                                    <div class="details">
                                            <h4>Mounted iMac And Desk Mod With Computer Components Built In</h4>
                                            <p>via Desktopped</p>
                                    </div>
                            </a>
                    </div>
                   
                    <!--Cover 2-->
                    <div class="mosaic-block cover2">
                            <a href="http://yourather.com/questions/135" target="_blank" class="mosaic-overlay"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/yourather.jpg"/></a>
                            <a href="http://yourather.com/questions/135" target="_blank" class="mosaic-backdrop">
                                    <div class="details">
                                            <h4>Hardest Choice Ever</h4>
                                            <p>via You Rather</p>
                                    </div>
                            </a>
                    </div>
                           
                    <!--Cover 3-->
                    <div class="mosaic-block cover3">
                            <div class="mosaic-overlay"><img src="http://buildinternet.s3.amazonaws.com/projects/mosaic/omr-office.jpg"/></div>
                            <a href="http://officeal.com/offices/one-mighty-roar/" target="_blank" class="mosaic-backdrop">
                                    <div class="details">
                                            <h4>One Mighty Roar Office</h4>
                                            <p>via Officeal</p>
                                    </div>
                            </a>
                    </div>
                   
                    <div class="clearfix"></div>
            </div>
           
    </body>
    </html>
     

    gar85

    • Schreiberling
    • Beiträge: 347
    Re: jQuery Thumbnail Hover in "main_content.html" einbinden
    Antwort #3 am: 20. März 2012, 08:49:59
    Hallo @deadlyclaws

    ich habe es ausprobiert, aber die Überlagerung noch nicht hinbekommen.
    Bist du inzwischen weiter?
    2 Antworten
    2880 Aufrufe
    03. Juli 2010, 11:59:28 von jannemann
    11 Antworten
    903 Aufrufe
    24. April 2023, 18:55:58 von Frank71
    2 Antworten
    2692 Aufrufe
    29. März 2012, 23:15:14 von load4all