Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#find-friends-pick-grid').click(function(e) {
- console.log('big click');
- var buttons = $(e.target).closest('button').closest('div');
- if (!buttons.length) {
- return;
- }
- var active = buttons.find('button:visible');
- console.log('click');
- console.log(active);
- if (active.hasClass('state-follow')) {
- buttons.find('button').hide().filter('.state-following').show();
- buttons.one('mouseleave', function() {
- buttons.hover(function() {
- buttons.find('button').hide().filter('.state-unfollow').show();
- }, function() {
- buttons.find('button').hide().filter('.state-following').show();
- });
- });
- } else if (active.hasClass('state-unfollow')) {
- buttons.unbind('mouseenter').unbind('mouseleave');
- buttons.find('button').hide().filter('.state-follow').show();
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement