Created
March 13, 2012 18:46
-
-
Save mkorostoff/2030634 to your computer and use it in GitHub Desktop.
Fan Club Styler
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
Drupal.behaviors.stay_classy = { | |
attach: function() { | |
//We're going to look at each views-row, some of them will get special "fan club" styles. We'll search by URL instead of class because it's all that's avaiable to us | |
jQuery('li.views-row') | |
.has('.views-field-field-blog-category a[href="/news/category/Fan-Club-News"],.fan-club-hider a[href="/forum/kid-rock-congregation"],.fan-club-hider a[href="/forum/all-summer-long-8"],.fan-club-hider a[href="/forum/krc-faqcomments"],.views-field-field-photo-category a[href="/photo/category/pro/The%20KRC%20Exclusives"],.views-field-field-photo-category a[href="/photo/category/pro/The%20KRC%20Live%20Photos"],.views-field-field-photo-category a[href="/photo/category/fan/The%20KRC%20Fan%20Photos"],.views-field-field-video-category a[href="/video/category/fan/The%20KRC%20Fan%20Videos"],.views-field-field-video-category a[href="/video/category/pro/The%20KRC%20Exclusives"]') | |
.addClass('fan-club-row'); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment