Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ahultgren/Lighty
base: a359be165c
...
head fork: ahultgren/Lighty
compare: 1191c4aaea
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 1 addition and 1 deletion.
  1. +1 −1  dist/jquery.lighty.min.js
View
2  dist/jquery.lighty.min.js
@@ -1,3 +1,3 @@
-/*! jq Lighty - v0.0.1 - 2012-05-23
+/*! jq Lighty - v0.0.1 - 2012-05-27
* Copyright (c) 2012 Andreas Hultgren; Licensed MIT */
(function(a){function b(){var b={baseZ:5,data:function(){return{jsonposts:1}},prefix:"lighty-",itemTemplate:function(a){var b='<img src="'+a[0].the_post_thumbnail[0]+'" />'+'<p class="desc">'+a[0].the_excerpt+"</p>";return{markup:b,width:a[0].the_post_thumbnail[1],height:a[0].the_post_thumbnail[2]}}},c,d,e,f,g=function(){var f=a(this);return e=f,c.show(),d.empty().append('<div class="'+b.prefix+'waiter"></div>').css({top:f.offset().top-a(window).scrollTop,left:f.offset().left,width:f.width(),height:f.height()}).show(),a.ajax({url:f.attr("href"),data:b.data.call(f),dataType:"json",error:function(a,b){},success:function(a){var c=b.itemTemplate.call(this,a);d.lighty("resize",{width:c.width,height:c.height},function(){d.empty().append(c.markup)})}}),this},h=function(){c.hide(),d.hide().empty(),e=undefined};this.init=function(i){return f=this,a.extend(b,i),c=a(document.createElement("div")).attr("id",b.prefix+"bg").css({position:"fixed",top:0,left:0,right:0,bottom:0,"z-index":b.baseZ}).hide().appendTo("body").click(function(){h()}),d=a(document.createElement("div")).attr("id",b.prefix+"container").css({position:"fixed",left:a(window).width()/2,top:a(window).height()/2,"z-index":b.baseZ+1}).hide().appendTo("body"),a(window).keydown(function(a){var b;e&&(a.which===39?(a.preventDefault(),b=f[f.index(e)+1]):a.which===37&&(a.preventDefault(),b=f[f.index(e)-1]),b?g.call(b):(!b&&(a.which===39||a.which===37)||a.which===27)&&h())}),this.each(function(){a(this).click(function(a){a.preventDefault(),g.call(this)})})},this.resize=function(b,c){return this.each(function(){var d=a(window),e=d.width(),f=d.height(),g;b=b||{},b.height=b.height||a(this).height(),b.width=b.width||a(this).width(),b.width>e-50&&(g=(e-50)/b.width,b.width*=g,b.height*=g),b.height>f-100&&(g=(f-100)/b.height,b.width*=g,b.height*=g),a(this).animate({width:b.width,height:b.height,left:e/2-b.width/2,top:f/2-b.height/2},{duration:200,complete:function(){typeof c=="function"&&c()}})})}}a.fn.lighty=function(c){if(this.length){var d=new b;if(d[c])return d[c].apply(this,Array.prototype.slice.call(arguments,1));if(typeof c=="object"||!c)return d.init.apply(this,arguments);a.error("Method "+c+" does not exist on jQuery.lighty")}}})(jQuery);

No commit comments for this range

Something went wrong with that request. Please try again.