I couldn’t take it anymore. The flash photo sets on tumblr were killing me. I’ve been wanting to make photo posts with multiple photos sans the flash slideshow WITH high res images since day one. The functionality tumblr provides in this area is obtrusive and inconsistent.
I’m using Chris Kalani’s “JQuery Kill Photoset” script on a client’s website and it works spectacularly well. However I was pretty annoyed with this script because it didn’t allow for photosets to display captions under their respective photos.
So, I edited the script. To get captions to display, add this:
var caption = this[“caption”];
$this.append(‘<p>’+caption+’</p>’);
after this:
var img = this[“photo-url-“+o.photoSize];
$this.append(‘<p><img src=”’+img+’” /></p>’);
All together, now:
;(function($){
var defaults = {
photoSize: 1280
};
$.fn.killPhotoset = function(options){
var o = $.extend(defaults, options);
return this.each(function(){
var $this = $(this);
$this.empty();
var set = $this.attr(“id”);
var id = set.split(“_”)[1];
$.getJSON(“/api/read/json?id=”+id+”&callback=?”, function(boom){
var pix = boom[“posts”][0][“photos”];
$.each(pix, function(){
var img = this[“photo-url-“+o.photoSize];
$this.append(‘<p><img src=”’+img+’” /></p>’);
var caption = this[“caption”];
$this.append(‘<p>’+caption+’</p>’);
});
});
});
};
})(jQuery);
Actually does it’s job now. Thanks Chris Kalani for this script in the first place.
DEAR FOLLOWERS: Sorry for the nerdiness. Back to your regularly scheduled programming of cute animals, motivating quotes, and celebrity news.
-
brandonltran liked this
-
arolabs reblogged this from chriskalani
-
aros liked this
-
coolrandomstuffyeah liked this
-
coolrandomstuffyeah reblogged this from prostheticknowledge
-
jbrewlet liked this
-
teamrobintunney liked this
-
disproven liked this
-
ourreligionisyou liked this
-
georgedunkley liked this
-
seenslashsaw reblogged this from chriskalani and added:
I’m using Chris Kalani’s “JQuery Kill Photoset” script...client’s website
-
j0hnjp liked this
-
raaphorst liked this
-
wrawr liked this
-
ninawilkins liked this
-
-abstrus liked this
-
konhype liked this
-
stewartmccoy liked this
-
freshmoves liked this
-
archangelskytower liked this
-
wearejustcoolkids liked this
-
luclatulippe reblogged this from chriskalani and added:
Thank you Chris! This...so much better than
-
luclatulippe liked this
-
aliukani liked this
-
stvnlim liked this
-
vlc-iphone-app liked this
-
myeyesseenitall liked this
-
colinhand liked this
-
half-ghost-half-human liked this
-
kyleellman liked this
-
krislane liked this
-
naomimaria liked this
-
joesunga liked this
-
ninefive-eightsix liked this
-
rankandfile liked this
-
wildays liked this
-
majho liked this
-
networkshadow liked this
-
dydric liked this
-
mitchjohnson liked this
-
redcloud liked this
-
summerordonez liked this
-
nikpawlak liked this
-
escapealone liked this
-
me-vs-gutenberg liked this
-
realityshmality reblogged this from robynchell
-
snakebomb liked this
-
odios liked this
-
stanleylieber reblogged this from prostheticknowledge
-
stanleylieber liked this
- Show more notes