/* ------------------------------------------------------------------- * * Author: Blupixel IT Srl * Last Modifcation Date: 5th August 2012 * Website: www.blupixelit.eu * support at: webmaster@blupixelit.eu * * Copyright (c) 2012 Blupixel IT Srl - Trento (Italy) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * ----------------------------------------------------------------- */ bITPreview has been created by Blupixel IT Srl and is realeased under the GPL License. bITPreview provide a function that if applied to one or more dom elements bind the hover event to display an overlay layer with inside the image specified in the data-img attribute of the element. It Requires jQuery! How To Use: Unpack it and copy the folder in some path of the website. Then Include the scripts jquery and bITPreview in the header of the page. Example: How To Use: - simply call the function name: jQuery('#mydom').bITPreview(); on an element that has the data-img attribute set with the bigger image address - or use additional params: jQuery('#mydom').bITPreview({ loadingImage: '/myimages/loading.gif', refAttribute: 'data-href' }); Possible Parameters: - refAttribute: text is the attribute to get the image address from - height: number if adaptToImage is false determine the height of the layer containing image - width: number if adaptToImage is false determine the width of the layer containing image - css: object object containing all the css params in jQuery standard to be applied to the layer containing the big image. For example: css: { backgroundColor: '#FFFFFF', opacity: '1', border: '1px solid #000000', textAlign: 'center', borderRadius: 10 } - mouseDistance: number distance in pixel from the mouse cursor when the layer appears - topOffset: number (positive or negative) number of pixel to be added to the top position of the layer when it appears - adaptToImage: boolean if true adapt the layer to the image contained even if width and height have been set - adaptToImagePadding: number set the padding of the layer containing the bigger image - loadingImage: text it's the address of the loading image to be displayed while the other one is loading