
jquery-lightbox-0.5
qscroller_js
Jeszcze jedna ważna informacja to fakt że korzystam ze znanego systemu szablonów zwanego Smarty
plik.tpl
<!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" /> <title>Aktualnosci </title> <link href="shop.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="../style-projects-jquery.css" /> <link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" /> <link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" /> <!-- Ativando o jQuery lightBox plugin --> <script type="text/javascript"> {literal} jQuery.noConflict(); jQuery(function() { // Use this example, or... jQuery('a[@rel*=lightbox]').lightBox(); }); {/literal} </script> </head> <body> {include file="top.tpl"} <div id="site"> <div style="background-image: url('templates/images/02.jpg'); background-repeat: no-repeat;"> <div id="bg_site"> <div style="padding-top: 20px; margin-left: 120px;"> <div style="padding-right: 7px;padding-top: 100px;float: left;"> <a id="go-prev" href="java script:void(0)"> </div> <div style="height: 203px; float: left;"> <div id="qscroller2" class="qscroller"> </div> <div class="hide"> {foreach from=$result key=myId item=products name=products} {if $smarty.foreach.products.index%6 == 0} <div class="qslide2">{/if} <div style="margin-left: 15px;height: 185px; width: 279px; float: left;"> <div style="padding-left: 31px;padding-top: 11px;width: 376px; height: 140px; background-repeat: no-repeat; background-image: url('templates/images/49.png');"> <div> <img src="templates/images/{$products.img_small}"> </div> <div> <a href="templates/images/{$products.img_small}" title="{$products.title}" rel="lightbox"> </div> </div> <div style="padding-left: 22px; margin-bottom: 2px; font-family: Tahoma; font-size: 10px; color: #315b06;"> <center> </center> </div> </div> {if $smarty.foreach.products.index%6 == 5 || $smarty.foreach.products.last} </div> {/if} {/foreach} </div> </div> </div> <div style="padding-top: 100px; margin-left: 28px; float: left;"> <a id="go-next" href="java script:void(0)"> </div> <script type="text/javascript"> {literal} window.addEvent('domready', function() { var opt = { slides: 'qslide2', duration: 1500, buttons: {next:'go-next',prev:'go-prev'}, transition: Fx.Transitions.Quint.easeOut } var scroller = new QScroller('qscroller2',opt); scroller.load(); }); {/literal} </script> </div> </div> {include file="bottom.tpl"} </body> </html>
Teraz kilka ważnych uwag odnośnie działania skryptu. Skrypt pobiera wszystkie produkty z bazy danych które są przetwarzane przez pętlę a następnie przypisywane do odpowiednich zmiennych następnie wszystkie produkty wczytywane są do tego diva
które w divie mają nadaną klasę qslide2
<div class="qslide2">
Dlatego wszystko też musi znajdować się w tym divie

Aktualnie chce zrobić aby po kliknięciu obrazka "zobacz" pokazało mi ładnie za pomocą skryptu js pokazało mi powiększoną wersje tego obrazka. Więc zrobiłem to tak
I wiecie co działa wszystko pięknie ale tylko gdy nie znajduje się w divie z nadaną klasę qslide2 Niestety musi on być jak wcześniej pisałem gdzie indziej nie miało by to sensu i teraz pytanie do was Dlaczego tylko w tym divie o tej klasie nie działa a wszędzie indziej gdzie umieszczenie tego nie ma sensu działa ?

Nie ma mądrych ?!