Unlike in example18.php this and most other examples do not require any PHP codes in the frontend and could be even posted with WYSIWYG editor into a CMS content. All you have to do is to define ajaxZoom.parameter string with paths to the source images and adjust the path to axZm directory.
In the code below we show two possibilities. The first one requires that jQuery core, AJAX-ZOOM javascript and css files are already in head. If you do not have access to head you can also use the second possibility and insert jquery.axZm.loader.js in a script tag which will byload jQuery core if not already present and other javascript / css files instantly.
<!-- Include jQuery core into head section if not already present --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <!-- AJAX-ZOOM javascript --> <script type="text/javascript" src="../axZm/jquery.axZm.js"></script> <link type="text/css" href="../axZm/axZm.css" rel="stylesheet" />
<!-- Div where AJAX-ZOOM is loaded into --> <div id="ajaxZoomContainer" style="min-height: 462px;">Loading, please wait...</div>
<script type="text/javascript"> // Create empty object var ajaxZoom = {}; // Define the path to the axZm folder ajaxZoom.path = "../axZm/"; // Define your custom parameter query string ajaxZoom.parameter = "example=2&zoomData=/pic/zoom/furniture/furniture_004.jpg\ |/pic/zoom/furniture/furniture_003.jpg\ |/pic/zoom/boutique/boutique_001.jpg\ |/pic/zoom/boutique/boutique_002.jpg\ "; // The ID of the element where ajax-zoom has to be inserted into ajaxZoom.divID = "ajaxZoomContainer"; ajaxZoom.opt = { onLoad: function(){ // Do something } }; // Load AJAX-ZOOM jQuery(document).ready(function(){ // not responsive jQuery.fn.axZm.load({ opt: ajaxZoom.opt, path: ajaxZoom.path, parameter: ajaxZoom.parameter, divID: ajaxZoom.divID }); // open AZ responsive /* jQuery.fn.axZm.openFullScreen( ajaxZoom.path, ajaxZoom.parameter, ajaxZoom.opt, ajaxZoom.divID, true, false, false ); */ }); </script>
<!-- Div where AJAX-ZOOM is loaded into --> <div id="ajaxZoomContainer" style="min-height: 462px;">Loading, please wait...</div>
<script type="text/javascript"> // Create empty object var ajaxZoom = {}; // Define the path to the axZm folder ajaxZoom.path = "../axZm/"; // Define your custom parameter query string ajaxZoom.parameter = "example=2&zoomData=/pic/zoom/furniture/furniture_004.jpg\ |/pic/zoom/furniture/furniture_003.jpg\ |/pic/zoom/boutique/boutique_001.jpg\ |/pic/zoom/boutique/boutique_002.jpg\ "; // The ID of the element where ajax-zoom has to be inserted into ajaxZoom.divID = "ajaxZoomContainer"; ajaxZoom.opt = { onLoad: function(){ // Do something } }; </script> <!-- Insert the loader file that will take the above settings (ajaxZoom) and load the player --> <script type="text/javascript" src="../axZm/jquery.axZm.loader.js"></script>
<!-- AJAX-ZOOM will be loaded into iframe --> <iframe src="../examples/example33_vario.php?zoomData=/pic/zoom/furniture/furniture_003.jpg|/pic/zoom/boutique/boutique_001.jpg" width="100%" height="400" frameborder="0" scrolling="no" marginwidth="0" marginheight="0" allowfullscreen></iframe>
By defining the query string parameter in ajaxZoom.parameter example=2 some default settings from /axZm/zoomConfig.inc.php
are overridden in /axZm/zoomConfigCustom.inc.php after elseif ($_GET['example'] == 2){
So if changes in /axZm/zoomConfig.inc.php have no effect look for the same options /axZm/zoomConfigCustom.inc.php;
elseif ($_GET['example'] == 2){
you could for example set:
$zoom['config']['picDim']
- inner size of the player.$zoom['config']['useHorGallery']
- enable / disable horizontal gallery.$zoom['config']['useGallery']
- enable / disable vertical gallery.$zoom['config']['displayNavi']
- enable / disable navigation bar.$zoom['config']['innerMargin']
- border width around the player.