Guest User

Untitled

a guest
Apr 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //<!--
  2. $(function(){
  3. var postlabels = $(".post-labels");
  4. for(var i=0;i<postlabels.length;i++){
  5.   postlabels[i].labels=[];
  6.   for(var j=0;j<postlabels[i].children.length;j++){
  7.     postlabels[i].labels.push($(postlabels[i].children[j]).text());
  8.   }
  9. }
  10. for(var i=0;i<postlabels.length;i++){
  11.   if(  $.inArray("Python" , postlabels[i].labels)!=-1  ){
  12.     $(postlabels[i]).parent().parent().parent().css("background","#454");
  13.     $(postlabels[i]).parent().parent().parent().children(".post-title").css("color","#afa").find("a").css("color","#afa");
  14.     $(postlabels[i]).children(":contains('Python')").css("color","#afa");
  15.   }
  16.   else if(  $.inArray("C" , postlabels[i].labels)!=-1  ){
  17.     $(postlabels[i]).parent().parent().parent().css("background","#553");
  18.     $(postlabels[i]).parent().parent().parent().children(".post-title").css("color","#ffa").find("a").css("color","#ffa");
  19.     $(postlabels[i]).children(":contains('C')").css("color","#ff8");
  20.   }
  21.   else if(  $.inArray("jQuery" , postlabels[i].labels)!=-1  ){
  22.     $(postlabels[i]).parent().parent().parent().css("background","#445");
  23.     $(postlabels[i]).parent().parent().parent().children(".post-title").css("color","#ffa").find("a").css("color","#aaf");
  24.     $(postlabels[i]).children(":contains('jQuery')").css("color","#aaf");
  25.   }
  26. }
  27. });
  28. //-->
Add Comment
Please, Sign In to add comment