Created
August 12, 2018 09:16
-
-
Save rukeba/b5fc62c678e3c09d8c5d97971d8b6d69 to your computer and use it in GitHub Desktop.
500px: Mark followers in following list
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
// open followers popup | |
var followers = []; | |
jQuery('.follower_modal .actor .name').each(function(i, el){ | |
followers.push(jQuery(el).attr('href')) | |
}); | |
// close followers popup | |
// open following popup | |
jQuery('.follower_modal .actor .name').each(function(i, el){ | |
var $el = jQuery(el); | |
var href = $el.attr('href'); | |
if (followers.includes(href)){ | |
$el.addClass('my-follower'); | |
} else { | |
$el.addClass('not-my-follower'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment