code_junkie

jQuery Hide using ID

Nov 13th, 2011
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. $('#photo'+photo['id']+'').click(function(){
  2. $('#photo'+photo['id']+'').css('border-color','#777');
  3.  
  4. });
  5.  
  6. $('img.flickr_photo').click(function() {
  7. $("this.flickr_photo").css('border-color','#777');
  8. });
  9.  
  10. $('img.flickr_photo').click(function(){
  11. $(this).css('border-color','#777');
  12. });
  13.  
  14. $('img.flickr_photo').click(function(){
  15. $(this).addClass('greyishBorder');
  16. });
  17.  
  18. alert($('#photo'+photo['id']).length);
  19.  
  20. $('#photo'+photo['id']).click(function(){
  21. $(this).css('border-color','#777');
  22. });
  23.  
  24. $('#photo'+photo['id']); // so you get this: #photophoto239839
  25.  
  26. function (photoElem) {
  27. $(photoElem).click(function() {
  28. $(this).css('border-color','#777');
  29. });
  30. }
  31.  
  32. $(this).addClass("active");
  33. $(this).removeClass("active");
Add Comment
Please, Sign In to add comment