Здравствуйте. Использую скрипт highslide для увеличения изображения по клику с затемнением фона. Подключаю скрипт. В html работает вовсех браузерах. После вставки кода в xslt, не работает ни в одном браузере. Проверял в IE 9, 8, Mozille, Opere. Как исправить чтобы работало во всех браузерах увеличение изображения с помощью скрипта? Код |
<?xml version='1.0' encoding='utf-8'?> <?xml-stylesheet type='text/xsl' href='stylesheet.xsl'?> <Root>
<Statya> <Image>nophoto.jpg</Image> </Statya>
</Root>
|
Код |
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> <xsl:template match="/Root"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru" lang="ru"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="highslide/highslide.js"></script>
<script type="text/javascript"> hs.graphicsDir = 'highslide/graphics/'; hs.captionId = 'the-caption'; hs.outlineType = 'rounded-white'; </script>
<style type="text/css"> * { font-family: Verdana, Helvetica; font-size: 10pt; } .highslide { cursor: url(highslide/graphics/zoomin.cur), pointer; outline: none; } .highslide-active-anchor img { visibility: hidden; } .highslide img { border: 2px solid gray; } .highslide:hover img { border: 2px solid white; }
.highslide-wrapper { background: white; } .highslide-image { border: 2px solid white; } .highslide-image-blur { } .highslide-caption { display: none; border: 2px solid white; border-top: none; font-family: Verdana, Helvetica; font-size: 10pt; padding: 5px; background-color: white; } .highslide-loading { display: block; color: black; font-size: 8pt; font-family: sans-serif; font-weight: bold; text-decoration: none; padding: 2px; border: 1px solid black; background-color: white; padding-left: 22px; background-image: url(highslide/graphics/loader.white.gif); background-repeat: no-repeat; background-position: 3px 1px; } a.highslide-credits, a.highslide-credits i { padding: 2px; color: silver; text-decoration: none; font-size: 10px; } a.highslide-credits:hover, a.highslide-credits:hover i { color: white; background-color: gray; }
.highslide-move { cursor: move; } a.highslide-full-expand { background: url(highslide/graphics/fullexpand.gif) no-repeat; display: block; margin: 0 10px 10px 0; width: 34px; height: 34px; }
/* These must always be last */ .highslide-display-block { display: block; } .highslide-display-none { display: none; }
/* These are not Highslide core CSS rules, but define the styles of the caption. */ .control { float: right; display: block; position: relative; margin: 0 5px; font-size: 9pt; font-weight: bold; text-decoration: none; text-transform: uppercase; margin-top: 1px; margin-bottom: 1px; } .control:hover { border-top: 1px solid #333; border-bottom: 1px solid #333; margin-top: 0; margin-bottom: 0; } .control, .control * { color: #666; } </style> <!--[if lt IE 7]> <script src="js/_offsetTopMain.js" /> <script src="js/_offsetTop.js" /> <script> alert('cvb'); </script> <![endif]--> <!--[if IE 7]> <script src="js/_offsetTopMain.js" /> <script src="js/_offsetTop.js" /> <script> alert('cvb'); </script> <![endif]--> <!--[if IE 8]> <script src="js/_offsetTopMain.js" /> <script src="js/_offsetTop.js" /> <script src="js/prototype.js" type="text/javascript"></script> <script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script> <script src="js/lightbox.js" type="text/javascript"></script> <script> alert('cvb'); </script> <![endif]--> <!--[if IE 9]> <script src="js/_offsetTopMain.js" /> <script src="js/_offsetTop.js" /> <script type="text/javascript" src="highslide/highslide.js"></script>
<script type="text/javascript"> hs.graphicsDir = 'highslide/graphics/'; hs.captionId = 'the-caption'; hs.outlineType = 'rounded-white'; </script> <![endif]--> <!--[if gt IE 9]> <script src="js/_offsetTopMain.js" /> <script src="js/_offsetTop.js" /> <script type="text/javascript" src="highslide/highslide.js"></script>
<script type="text/javascript"> hs.graphicsDir = 'highslide/graphics/'; hs.captionId = 'the-caption'; hs.outlineType = 'rounded-white'; </script> <![endif]--> <!--[if !IE]><!--> <script src="js/_offsetTopMain.js" /> <script src="js/_offsetTop.js" /> <script type="text/javascript" src="highslide/highslide.js"></script>
<script type="text/javascript"> hs.graphicsDir = 'highslide/graphics/'; hs.captionId = 'the-caption'; hs.outlineType = 'rounded-white'; </script> <!--<![endif]-->
</head> <body>
<xsl:for-each select="Statya"> <xsl:variable name="i" select="position()" />
<xsl:variable name="ssilka"> <xsl:value-of select="/Root/Statya[position()=$i]/Image" /> </xsl:variable>
<div>
<a href="images/{$ssilka}" class="highslide" onclick="return hs.expand(this)"> <img src="images/{$ssilka}" alt="Highslide JS" title="Click to enlarge" height="80" width="120" /></a>
<div class='highslide-caption' id='the-caption'> <a href="#" onclick="return hs.previous(this)" class="control" style="float:left; display: block"> Previous <br/> <small style="font-weight: normal; text-transform: none">left arrow key</small> </a> <a href="#" onclick="return hs.next(this)" class="control" style="float:left; display: block; text-align: right; margin-left: 50px"> Next <br/> <small style="font-weight: normal; text-transform: none">right arrow key</small> </a> <a href="#" onclick="return hs.close(this)" class="control">Close</a> <a href="#" onclick="return false" class="highslide-move control">Move</a> <div style="clear:both"></div> </div> </xsl:for-each> </div> </body> </html> </xsl:template>
<xsl:template name="for"> <xsl:param name="i" select="position()"/> <xsl:param name="n" /> <xsl:if test="$i < $n"> <xsl:call-template name="for"> <xsl:with-param name="i" select="$i+1"/> <xsl:with-param name="n" select="$n"/> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet>
|
|