This file contains hidden or 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
$(document).on('click', function(e){ | |
if ($(e.target) == $('.learn-more-btn')){ | |
console.log('yo, they're the same element!') | |
}); |
This file contains hidden or 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
SELECT ordered_posts.vote_score as vote_score,(CASE WHEN current_user_subscriptions.user_id IS NULL THEN '0' ELSE '1' END) as user_is_following, ordered_posts.influencer_id, current_user_subscriptions.user_id | |
FROM (SELECT * FROM posts ORDER BY vote_score desc) as ordered_posts | |
LEFT OUTER JOIN | |
(SELECT * FROM influencer_subscriptions WHERE user_id = 1) AS current_user_subscriptions | |
ON ordered_posts.influencer_id = current_user_subscriptions.influencer_id | |
WHERE ordered_posts.community_board = TRUE | |
GROUP BY influencer_id | |
ORDER BY user_is_following desc, ordered_posts.created_at desc |
This file contains hidden or 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
$(document).ready -> | |
$('.thing').click (e)-> | |
specialVariable = (some stuff for calculating the variable here) | |
#function I want to run | |
someFunction(special_variable) |
NewerOlder