Posted By

krunkosaurus on 01/16/09


Tagged

javascript page kickapps groups


Versions (?)

KickApps: Adding classes to the leave / join button on the groups page.


 / Published in: JavaScript
 

Sometime, you need unique classes on the leave join button of the groups page. Place this script in your AC footer.

-- For more tips and tricks checkout the KickApps resources page.

  1. var oldStallLeaveJoin = stallLeaveJoin;
  2. newStallLeaveJoing = function() {
  3. var isMember = $j('#ka_joinButton > input').attr('value') ==
  4. "leave this group";
  5. if (isMember) {
  6. $j('#ka_joinButton >
  7. input').addClass('ka_isMember').removeClass('ka_isNotMember');
  8. } else {
  9. $j('#ka_joinButton >
  10. input').addClass('ka_isNotMember').removeClass('ka_isMember');
  11. }
  12. };
  13. stallLeaveJoin = function() {
  14. newStallLeaveJoing();
  15. oldStallLeaveJoin();
  16. };
  17. // uncomment the below line only if needed
  18. // newStallLeaveJoing();

Report this snippet  

You need to login to post a comment.