Guest User

Untitled

a guest
Aug 15th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. .toggleClass not working with .live
  2. $(document).ready(function(e) {
  3. $(this).live('focusin, blur', function() {
  4. $(':input[type="text"]').bind('focusin blur', function() {
  5. $(this).toggleClass('fieldFocus');
  6. })
  7. });
  8. });
  9.  
  10. $(':input[type="text"]').bind('focusin blur', function() {
  11. $(this).toggleClass('fieldFocus');
  12. });
  13.  
  14. $(document).ready(function(e) {
  15. $(':input[type="text"]').live('focusin blur', function() {
  16. $(this).toggleClass('fieldFocus');
  17. });
  18. });
  19. });
  20.  
  21. $(':input[type="text"]').live('focusin blur', function() {
  22. $(this).toggleClass('fieldFocus');
  23. });
  24.  
  25. $(document).on('focusin focusout', ':text', function(){
  26. $(this).toogleClass('fieldFocus');
  27. });
  28.  
  29. $(':text').live('focusin blur', function() {
  30. $(this).toggleClass('fieldFocus');
  31. });
  32.  
  33. $(this).live('focusin focusout')
  34.  
  35. $(this).live('focusin, focusout')
Add Comment
Please, Sign In to add comment