source: extensions/flop_style/mainpage_categories/jPolaroid/jquery.jpolaroid.min.js @ 17564

Last change on this file since 17564 was 12500, checked in by flop25, 13 years ago

jPolaroid.tpl corected for errors with minified js

File size: 1.9 KB
Line 
1/**
2 * jPolaroid
3 *   http://steveram.info/jPolaroid/
4 *
5 * Copyright (c) 2009 Steven Ramkumar (http://steveram.info)
6 * Licensed under GPL (GPL-LICENSE.txt).
7 *
8 * Built on top of the jQuery library
9 *   http://jquery.com
10 *
11 * Inspired by the author of nogoodatcoding.com
12 *   http://nogoodatcoding.com/
13 */
14
15jQuery.fn.polaroid=function(options){var options=jQuery.extend({tape:true,shadow:"left-bottom",bottom:"33px",top:"22px",left:"27px",right:"27px",shadowPos:"bottom-right",shadowColor:"#CCCCCC",backgroundColor:"#FDFDFD"},options);return this.each(function(){$(this).addClass('polaroid-pic');$(this).wrap('<div class="polaroid-container"></div>');$(this).wrap('<div class="polaroid-shadow"></div>');$(this).wrap('<div class="polaroid"></div>');$(this).wrap('<div class="polaroid-content-container"></div>');$(this).parent().attr("style","margin:"+options.top+" "+options.right+" "+options.bottom+" "+options.left);switch(options.shadowPos){case"bottom-right":$(this).parent().parent().attr("style","top: -3px; left:-3px; background-color:"+options.backgroundColor);break;case"bottom-left":$(this).parent().parent().attr("style","top: -3px; left:3px; background-color:"+options.backgroundColor);break;case"top-left":$(this).parent().parent().attr("style","top: 3px; left:3px; background-color:"+options.backgroundColor);break;case"top-right":$(this).parent().parent().attr("style","top: 3px; left:-3px; background-color:"+options.backgroundColor);break;default:$(this).parent().parent().attr("style","top: -3px; left:-3px; background-color:"+options.backgroundColor)}$(this).parent().parent().parent().attr("style","background-color:"+options.shadowColor);if(options.tape===true){$(this).parent().parent().parent().parent().append('<span class="tape top-left">&nbsp;</span>');$(this).parent().parent().parent().parent().append('<span class="tape top-right">&nbsp;</span>')}})};
Note: See TracBrowser for help on using the repository browser.