This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( $ ){ | |
$.fn.pushTop = function() { | |
return this.each(function() { | |
var $this = $(this); | |
top_z_index = 0; | |
$('*').each(function() { | |
var this_z_index = $(this).css('z-index'); | |
if (this_z_index != "auto" && this_z_index > top_z_index) { | |
top_z_index = this_z_index; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setFacebookLike() { | |
$('html').attr("xmlns:og","http://www.facebook.com/2008/fbml").attr("xmlns:fb","http://www.facebook.com/2008/fbml"); | |
// Remove previously created FB like elements -- if they exist -- so they can be re-added after AJAX pagination | |
$('.fb-recommend').remove(); | |
$('#fb-root').empty(); | |
// Build and inject Like button | |
$('ul.posts a').each(function() { | |
var fb_url = location.href.split('/')[0] + '//' + location.href.split('/')[2] + $(this).attr('href'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build and inject Like button | |
$('ul.posts a').each(function() { | |
var fb_url = location.href.split('/')[0] + '//' + location.href.split('/')[2] + $(this).attr('href'), | |
fb_like = '<div class="fb_recommend"><fb:like href="'+fb_url+'" layout="standard" show_faces="false" action="recommend" colorscheme="light"></fb:like></div>'; | |
$(this).parent().next().after(fb_like); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fb_like = '<div class="fb_recommend"><fb:like href="'+fb_url+'" layout="standard" show_faces="false" action="recommend" colorscheme="light"></fb:like></div>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(this).parent().next().after(fb_like); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load in FB javascript SDK | |
$('body').append('<div id="fb-root"></div>'); | |
window.fbAsyncInit = function() { | |
FB.init({appId: '146516048706850', status: true, cookie: true, xfbml: true}); | |
}; | |
(function() { | |
var e = document.createElement('script'); e.async = true; | |
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; | |
document.getElementById('fb-root').appendChild(e); | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('aside.filter li').each(function() { | |
var this_class = $(this).attr('class'), | |
people_count = $('div#crew_list > div.'+this_class+' div.user').length, | |
percentage = ((((people_count / $('div#crew_list div.user').length)*100)).toString()+'%'); | |
$(this) | |
.css('width',percentage) | |
.data('width',percentage) | |
.find('span') | |
.append(people_count); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// following code is simplified from actual implementation. | |
$('#portfolios .gallery').live('click',function(e) { | |
VS.lightbox.init(); | |
var folio_path = '/portfolio/'+$(this).data('id'); | |
$.ajax({ | |
type: 'GET', | |
url: folio_path, | |
success: function(data) { | |
VS.lightbox.addContent(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// following code is simplified from actual implementation. | |
$('#portfolios .gallery').live('click',function(e) { | |
VS.lightbox.init(); | |
var folio_path = '/portfolio/'+$(this).data('id'); | |
$.ajax({ | |
type: 'GET', | |
url: folio_path, | |
success: function(data) { | |
VS.lightbox.addContent(data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li> item 1 </li> | |
<li> ~ </li> | |
<li> item 2 </li> | |
<li> ~ </li> |
OlderNewer